CN114138181B - Method, device, equipment and readable medium for binding pool placement group owner selection - Google Patents

Method, device, equipment and readable medium for binding pool placement group owner selection Download PDF

Info

Publication number
CN114138181B
CN114138181B CN202111237021.1A CN202111237021A CN114138181B CN 114138181 B CN114138181 B CN 114138181B CN 202111237021 A CN202111237021 A CN 202111237021A CN 114138181 B CN114138181 B CN 114138181B
Authority
CN
China
Prior art keywords
members
master
pool
data structure
values
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202111237021.1A
Other languages
Chinese (zh)
Other versions
CN114138181A (en
Inventor
孙润宇
李彦博
孟祥瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Inspur Data Technology Co Ltd
Original Assignee
Zhengzhou Inspur Data Technology Co Ltd
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 Zhengzhou Inspur Data Technology Co Ltd filed Critical Zhengzhou Inspur Data Technology Co Ltd
Priority to CN202111237021.1A priority Critical patent/CN114138181B/en
Publication of CN114138181A publication Critical patent/CN114138181A/en
Application granted granted Critical
Publication of CN114138181B publication Critical patent/CN114138181B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools

Landscapes

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

Abstract

The invention provides a method, a device, equipment and a readable medium for selecting a binding pool placement group in distributed storage, wherein the method comprises the following steps: acquiring PG in the reference pool, acquiring corresponding PG in the binding pool according to the corresponding relation of PG, and putting the acquired PG into a variable structure; traversing the members of the PG in the reference pool, acquiring the IP of the node where the members are located, taking the acquired IP as a keyword, and taking the IDs of the members and the PG as a group of values to be stored in a data structure; traversing the members of the PG corresponding to the binding pool, and judging whether the node IP where the members are located can be inquired in the data structure; responding to the node IP where the member is located and inquiring in a data structure, and adding the IDs of the member and PG as a group of values into the data structure of the value of the IP key word; and obtaining the number of the values in each IP, and selecting the member in the structure with the largest number of the IP median values as the master of each PG. By using the scheme of the invention, the performance of the storage cluster can be improved, and the product competitiveness can be improved.

Description

Method, device, equipment and readable medium for binding pool placement group owner selection
Technical Field
The present invention relates to the field of computers, and more particularly, to a method, apparatus, device, and readable medium for binding pool placement group election in distributed storage.
Background
In a distributed storage system, stored contents are cut according to a fixed size, the block of data with the fixed size is called an object, PG is an aggregation of a plurality of objects, the PG and the objects are corresponded by a consistent hash algorithm, and one PG corresponds to the plurality of objects. And each PG corresponds to an OSD through a data distribution algorithm, one PG corresponds to a plurality of OSDs, the OSD can be simply understood as a physical disk, and a plurality of PGs can be arranged on one OSD, so that the content to be stored is placed on the disk. The storage pool is the aggregation of PGs.
In the distributed storage scenario, there is a scheme that OSDs are partitioned and deployed on a high-speed medium, such as an SSD, a cache memory pool is created by using the OSDs, an OSD is deployed on a low-speed medium HDD, a low-speed large-capacity memory pool is created by using the OSDs, the two memory pools are bound, all data requests from clients pass through the cache pool, and then, it is determined whether subsequent logic is issued to the pool for processing or forwarded to the low-speed pool for processing. The forwarding process is decided by the master in each PG member, and only the master can bear the read-write service request. The main step in the PG members is to select one of the member OSD of the PG as the main OSD to bear business reading and writing, and the other OSD is the slave OSD. There is a correspondence of one PG between the two binding storage pools, that is, when a PG of the high-speed pool forwards a request, only the PG of the low-speed pool corresponding to the PG can be forwarded to the PG, and only the PG has the forwarding function. Therefore, when the pressure of the storage cluster reaches a certain level, the problem of slow forwarding of the masters of the corresponding PGs is exposed, and one main reason for slow forwarding is that forwarding requests need to pass through a network, when the masters of the two corresponding PGs are not on the same node, the forwarding requests need to pass through the network, and when the network reaches a bottleneck, the forwarding speed is limited, so that the performance of the storage cluster cannot be expected.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, an apparatus, a device, and a readable medium for placing group owners in a binding pool in a distributed storage, by using the technical solution of the present invention, owners of corresponding PGs in two binding storage pools can be located on the same physical node as much as possible, thereby reducing the pressure of a network, improving the performance of a storage cluster, and improving the competitiveness of products.
Based on the above objects, an aspect of the embodiments of the present invention provides a method for placing a group owner in a binding pool in a distributed storage, including the steps of:
Acquiring PG in the reference pool, acquiring corresponding PG in the binding pool according to the corresponding relation of PG, and putting the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure;
Traversing the members of the PG in the reference pool, acquiring the IP of the node where the members are located, taking the acquired IP as a keyword, and taking the IDs of the members and the PG as a group of values to be stored in a data structure;
traversing the members of the PG corresponding to the binding pool, and judging whether the node IP where the members are located can be inquired in the data structure;
Responding to the node IP where the member is located and inquiring in a data structure, and adding the IDs of the member and PG as a group of values into the data structure of the value of the IP key word;
and obtaining the number of the values in each IP, and selecting the member in the structure with the largest number of the IP median values as the master of each PG.
According to one embodiment of the present invention, further comprising:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
And selecting the member with the least addition times as the master of each PG.
According to one embodiment of the present invention, further comprising:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG.
According to one embodiment of the present invention, further comprising:
Deleting the PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
In response to the variable structure not being empty, traversing members of the remaining PGs in the variable structure and adding the number of times the members are selected as primary;
And selecting the member with the least addition times as the master of each PG.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for binding pool placement group owner in distributed storage, the apparatus including:
The acquisition module is configured to acquire the PG in the reference pool, acquire the corresponding PG in the binding pool according to the corresponding relation of the PG, and put the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure;
The storage module is configured to traverse the members of the PG in the reference pool, acquire the IP of the node where the members are located, take the acquired IP as a key word, and store the IDs of the members and the PG as a group of values in the data structure;
the judging module is configured to traverse the members of the PG corresponding to the binding pool and judge whether the node IP where the members are located can be inquired in the data structure;
The adding module is configured to respond to the fact that the node IP where the member is located can be queried in the data structure, and add the IDs of the member and the PG as a group of values to the data structure of the value of the IP key word;
And the selection module is configured to acquire the number of values in each IP, and select the member in the structure with the largest number of the values in the IP as the master of each PG.
According to one embodiment of the invention, the selection module is further configured to:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
And selecting the member with the least addition times as the master of each PG.
According to one embodiment of the invention, the selection module is further configured to:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG.
According to one embodiment of the invention, the method further comprises a deletion module configured to:
Deleting the PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
In response to the variable structure not being empty, traversing members of the remaining PGs in the variable structure and adding the number of times the members are selected as primary;
And selecting the member with the least addition times as the master of each PG.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
And a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: according to the method for placing and selecting the binding pool in the distributed storage, PG in the reference pool is obtained, corresponding PG in the binding pool is obtained according to the corresponding relation of PG, and the obtained PG in the reference pool and the corresponding PG in the binding pool are placed into a variable structure; traversing the members of the PG in the reference pool, acquiring the IP of the node where the members are located, taking the acquired IP as a keyword, and taking the IDs of the members and the PG as a group of values to be stored in a data structure; traversing the members of the PG corresponding to the binding pool, and judging whether the node IP where the members are located can be inquired in the data structure; responding to the node IP where the member is located and inquiring in a data structure, and adding the IDs of the member and PG as a group of values into the data structure of the value of the IP key word; the method comprises the steps of obtaining the number of values in each IP, selecting members in the structure with the largest number of the IP median values as the main technical scheme of respective PG, enabling the main of the corresponding PG of the two binding storage pools to be on the same physical node as much as possible, reducing the pressure of a network, improving the performance of a storage cluster and improving the competitiveness of products.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart diagram of a method of binding pool placement group owner in a distributed storage according to one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for binding pool placement group owner in distributed storage according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
With the above object in view, in a first aspect, an embodiment of a method for binding pool placement group election in a distributed storage is provided. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
S1, acquiring PG in the reference pool, acquiring corresponding PG in the binding pool according to the corresponding relation of PG, and putting the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure.
The other storage pool is called a binding pool of the reference pool, and the number of the storage pools PG is always an integer power of 2, so that even if the number of the two storage pools PG is different, the relationship is an integer multiple of 2. From this, the following PG correspondence is always established: and taking the pool1 with the fewer PG number as a reference, segmenting the PGs in the storage pools with the more PG numbers according to the PG number of the pool1, wherein the PG number in each segmented part is equal to the PG number of the pool1, and carrying out one-to-one correspondence on each part and the PG of the pool1 to obtain the corresponding relation of the PGs. The first PG in the reference pool and the corresponding PG in the binding pool are acquired, and in the PG antitheft variable structures, as shown in fig. 2, the corresponding PG (group_pgs): 1.0,2.0,2.1024 denotes that PG No. 0 in the reference pool1 corresponds to PG No. 0 in the binding pool 2 and PG No. 1024 in the binding pool 2.
S2, traversing the members of the PG in the reference pool, acquiring the IP of the node where the members are located, taking the acquired IP as a keyword, and taking the IDs of the members and the PG as a group of values to be stored in a data structure.
Each PG has a plurality of OSD members, each member has a node IP where it is located, the node IPs among the members and the corresponding OSD members are counted, then the IDs of the OSD members and the PG are stored in a data structure as a set of values by taking the node IPs as keywords, as shown in fig. 3, the value in IP127.0.0.1 represents the number 0 PG corresponding to the number 0 OSD, IP127.0.0.2 in the reference pool 1 represents the number 6 OSD corresponding to the number 0 PG in the reference pool 1, and so on.
S3, traversing the members of the PG corresponding to the binding pool, and judging whether the node IP where the members are located can be inquired in the data structure.
S4, responding to the fact that the node IP where the member is located can be queried in the data structure, and adding the IDs of the member and the PG as a group of values to the data structure of the value of the IP key.
Then traversing members of PG of the binding pool corresponding to PG No. 0 in the reference pool 1, checking whether the node IP of the member can be queried in the data structure, and as shown in FIG. 4, increasing the value in IP127.0.0.1 to be OSD No.1 corresponding to PG No. 0 in the binding pool 2, OSD No. 2 corresponding to PG No. 1024 in the binding pool 2, and so on.
S5, obtaining the number of values in each IP, and selecting the member in the structure with the largest number of the IP median values as the master of each PG.
As shown in fig. 4, IP127.0.0.1 have 3 values, and if the number is the largest, the OSD corresponding to the 3 values is selected as the main of each PG. After the above steps are completed, the above steps are restarted from the second PG in the reference pool until all the main settings of all the PGs are completed.
By the technical scheme of the invention, the masters of the corresponding PGs of the two binding storage pools can be located on the same physical node as much as possible, the pressure of the network is reduced, the performance of the storage cluster is improved, and the product competitiveness is improved.
In a preferred embodiment of the present invention, further comprising:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
And selecting the member with the least addition times as the master of each PG. If the number of data in each IP in the data structure is the same, counting the times of each member as the main, and selecting the member with the least times as the main of the PG.
In a preferred embodiment of the present invention, further comprising:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG. If the number of times that the member takes the main is the same, counting the sum of the number of times that the member takes the main on the node, and selecting the member with the smallest sum of the number of times that the member takes the main on the node as the main of the PG.
In a preferred embodiment of the present invention, further comprising:
Deleting the PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
In response to the variable structure not being empty, traversing members of the remaining PGs in the variable structure and adding the number of times the members are selected as primary;
and selecting the member with the least addition times as the master of each PG. And after the selected main modification is completed, updating the OSD main count and the node main count, deleting the PGs from the group_pgs, if the group_pgs is not empty, indicating that the members with the PGs are not selected, traversing the members of the PGs, selecting the member with the least OSD main count as the main, if the members with the least OSD main count are the same, comparing the main counts of the nodes where the OSD is located, and updating the OSD main count and the node main count.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
In view of the above object, a second aspect of the embodiments of the present invention proposes an apparatus for placing a group owner in a binding pool in a distributed storage, as shown in fig. 2, an apparatus 200 includes:
The acquisition module is configured to acquire the PG in the reference pool, acquire the corresponding PG in the binding pool according to the corresponding relation of the PG, and put the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure;
The storage module is configured to traverse the members of the PG in the reference pool, acquire the IP of the node where the members are located, take the acquired IP as a key word, and store the IDs of the members and the PG as a group of values in the data structure;
the judging module is configured to traverse the members of the PG corresponding to the binding pool and judge whether the node IP where the members are located can be inquired in the data structure;
The adding module is configured to respond to the fact that the node IP where the member is located can be queried in the data structure, and add the IDs of the member and the PG as a group of values to the data structure of the value of the IP key word;
And the selection module is configured to acquire the number of values in each IP, and select the member in the structure with the largest number of the values in the IP as the master of each PG.
In a preferred embodiment of the invention, the selection module is further configured to:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
And selecting the member with the least addition times as the master of each PG.
In a preferred embodiment of the invention, the selection module is further configured to:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG.
In a preferred embodiment of the present invention, the method further comprises a deletion module configured to:
Deleting the PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
In response to the variable structure not being empty, traversing members of the remaining PGs in the variable structure and adding the number of times the members are selected as primary;
And selecting the member with the least addition times as the master of each PG.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, the instructions when executed by the processor performing the method of:
Acquiring PG in the reference pool, acquiring corresponding PG in the binding pool according to the corresponding relation of PG, and putting the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure;
Traversing the members of the PG in the reference pool, acquiring the IP of the node where the members are located, taking the acquired IP as a keyword, and taking the IDs of the members and the PG as a group of values to be stored in a data structure;
traversing the members of the PG corresponding to the binding pool, and judging whether the node IP where the members are located can be inquired in the data structure;
Responding to the node IP where the member is located and inquiring in a data structure, and adding the IDs of the member and PG as a group of values into the data structure of the value of the IP key word;
and obtaining the number of the values in each IP, and selecting the member in the structure with the largest number of the IP median values as the master of each PG.
In a preferred embodiment of the present invention, further comprising:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
And selecting the member with the least addition times as the master of each PG.
In a preferred embodiment of the present invention, further comprising:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG.
In a preferred embodiment of the present invention, further comprising:
Deleting the PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
In response to the variable structure not being empty, traversing members of the remaining PGs in the variable structure and adding the number of times the members are selected as primary;
And selecting the member with the least addition times as the master of each PG.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium S31 stores a computer program S32 that, when executed by a processor, performs the following method:
Acquiring PG in the reference pool, acquiring corresponding PG in the binding pool according to the corresponding relation of PG, and putting the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure;
Traversing the members of the PG in the reference pool, acquiring the IP of the node where the members are located, taking the acquired IP as a keyword, and taking the IDs of the members and the PG as a group of values to be stored in a data structure;
traversing the members of the PG corresponding to the binding pool, and judging whether the node IP where the members are located can be inquired in the data structure;
Responding to the node IP where the member is located and inquiring in a data structure, and adding the IDs of the member and PG as a group of values into the data structure of the value of the IP key word;
and obtaining the number of the values in each IP, and selecting the member in the structure with the largest number of the IP median values as the master of each PG.
In a preferred embodiment of the present invention, further comprising:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
And selecting the member with the least addition times as the master of each PG.
In a preferred embodiment of the present invention, further comprising:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG.
In a preferred embodiment of the present invention, further comprising:
Deleting the PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
In response to the variable structure not being empty, traversing members of the remaining PGs in the variable structure and adding the number of times the members are selected as primary;
And selecting the member with the least addition times as the master of each PG.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (10)

1. The method for placing the group owner in the binding pool in the distributed storage is characterized by comprising the following steps of:
Acquiring PG in the reference pool, acquiring corresponding PG in the binding pool according to the corresponding relation of PG, and putting the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure;
traversing the members of the PG in the reference pool, acquiring the IP of the node where the members are located, taking the acquired IP as a keyword, and taking the IDs of the members and the PG as a group of values to be stored in a data structure;
traversing the members of the corresponding PGs in the binding pool, and judging whether the node IP of the members of the corresponding PGs in the binding pool can be inquired in the data structure;
Responding to the fact that the node IP where the member of the corresponding PG in the binding pool is located can be inquired in the data structure, and adding the member of the corresponding PG in the binding pool and the ID of the PG as a group of values into the data structure of the value of the IP key word;
and obtaining the number of the values in each IP, and selecting the member in the structure with the largest number of the IP median values as the master of each PG.
2. The method as recited in claim 1, further comprising:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
and selecting the member with the least addition times as the master of each PG.
3. The method as recited in claim 2, further comprising:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG.
4. The method as recited in claim 1, further comprising:
deleting PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
Traversing members of the PG remaining in the variable structure and adding the times the members are selected as primary in response to the variable structure not being empty;
and selecting the member with the least addition times as the master of each PG.
5. An apparatus for binding pool placement group owner in distributed storage, the apparatus comprising:
the acquisition module is configured to acquire the PG in the reference pool, acquire the corresponding PG in the binding pool according to the corresponding relation of the PG, and put the PG in the acquired reference pool and the corresponding PG in the binding pool into a variable structure;
The storage module is configured to traverse the members of the PG in the reference pool, acquire the IP of the node where the members are located, take the acquired IP as a keyword, and store the IDs of the members and the PG as a group of values in a data structure;
The judging module is configured to traverse the members of the corresponding PGs in the binding pool and judge whether the node IP where the members of the corresponding PGs in the binding pool are located can be inquired in the data structure;
The adding module is configured to respond to the fact that the node IP where the member of the corresponding PG in the binding pool is located can be inquired in the data structure, and add the member of the corresponding PG in the binding pool and the ID of the PG as a group of values to the data structure of the value of the IP key;
and the selection module is configured to acquire the number of values in each IP, and select the member in the structure with the largest number of the IP median as the master of each PG.
6. The apparatus of claim 5, wherein the selection module is further configured to:
Responsive to the number of values obtained in each IP being the same, adding the number of times that the member of the data structure of each IP is selected as the master;
and selecting the member with the least addition times as the master of each PG.
7. The apparatus of claim 6, wherein the selection module is further configured to:
Calculating the sum of the times of mastering each OSD on the node where each member is located in response to the fact that the added values of the times of selecting the member as the master in the data structure of each IP are the same;
the sum of the number of times of mastering is selected as the master of the respective PG.
8. The apparatus of claim 5, further comprising a deletion module configured to:
deleting PG from the variable structure in response to setting the selected member as the master of the respective PG;
Judging whether the variable structure is empty or not;
Traversing members of the PG remaining in the variable structure and adding the times the members are selected as primary in response to the variable structure not being empty;
and selecting the member with the least addition times as the master of each PG.
9. A computer device, comprising:
at least one processor; and
A memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-4.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any of claims 1-4.
CN202111237021.1A 2021-10-24 2021-10-24 Method, device, equipment and readable medium for binding pool placement group owner selection Active CN114138181B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111237021.1A CN114138181B (en) 2021-10-24 2021-10-24 Method, device, equipment and readable medium for binding pool placement group owner selection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111237021.1A CN114138181B (en) 2021-10-24 2021-10-24 Method, device, equipment and readable medium for binding pool placement group owner selection

Publications (2)

Publication Number Publication Date
CN114138181A CN114138181A (en) 2022-03-04
CN114138181B true CN114138181B (en) 2024-06-11

Family

ID=80394704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111237021.1A Active CN114138181B (en) 2021-10-24 2021-10-24 Method, device, equipment and readable medium for binding pool placement group owner selection

Country Status (1)

Country Link
CN (1) CN114138181B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115202589B (en) * 2022-09-14 2023-02-24 浪潮电子信息产业股份有限公司 Placement group member selection method, device and equipment and readable storage medium
CN117061541B (en) * 2023-10-11 2024-02-09 苏州元脑智能科技有限公司 Storage double-pool binding method and device, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503237A (en) * 2016-11-04 2017-03-15 郑州云海信息技术有限公司 A kind of PG member selections method, device, storage pool and distributed file system
CN110018799A (en) * 2019-04-12 2019-07-16 苏州浪潮智能科技有限公司 A kind of main determining method, apparatus of storage pool PG, equipment and readable storage medium storing program for executing
CN110222013A (en) * 2019-06-11 2019-09-10 深信服科技股份有限公司 A kind of method, system, equipment and storage medium that cluster storage capacity determines
CN111414136A (en) * 2020-03-13 2020-07-14 苏州浪潮智能科技有限公司 Method, system, device and medium for creating storage pool
CN111708486A (en) * 2020-05-24 2020-09-25 苏州浪潮智能科技有限公司 Method, system, equipment and medium for balanced optimization of main placement group
CN111752483A (en) * 2020-05-28 2020-10-09 苏州浪潮智能科技有限公司 Method and system for reducing reconstruction data by changing storage medium in storage cluster
CN111930317A (en) * 2020-09-21 2020-11-13 柏科数据技术(深圳)股份有限公司 Data distribution method, device, server and storage medium based on CEPH

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110169008B (en) * 2018-07-10 2022-06-03 深圳花儿数据技术有限公司 Distributed data redundancy storage method based on consistent hash algorithm

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503237A (en) * 2016-11-04 2017-03-15 郑州云海信息技术有限公司 A kind of PG member selections method, device, storage pool and distributed file system
CN110018799A (en) * 2019-04-12 2019-07-16 苏州浪潮智能科技有限公司 A kind of main determining method, apparatus of storage pool PG, equipment and readable storage medium storing program for executing
CN110222013A (en) * 2019-06-11 2019-09-10 深信服科技股份有限公司 A kind of method, system, equipment and storage medium that cluster storage capacity determines
CN111414136A (en) * 2020-03-13 2020-07-14 苏州浪潮智能科技有限公司 Method, system, device and medium for creating storage pool
CN111708486A (en) * 2020-05-24 2020-09-25 苏州浪潮智能科技有限公司 Method, system, equipment and medium for balanced optimization of main placement group
CN111752483A (en) * 2020-05-28 2020-10-09 苏州浪潮智能科技有限公司 Method and system for reducing reconstruction data by changing storage medium in storage cluster
CN111930317A (en) * 2020-09-21 2020-11-13 柏科数据技术(深圳)股份有限公司 Data distribution method, device, server and storage medium based on CEPH

Also Published As

Publication number Publication date
CN114138181A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN114138181B (en) Method, device, equipment and readable medium for binding pool placement group owner selection
CA2822900C (en) Filtering queried data on data stores
US10901619B2 (en) Selecting pages implementing leaf nodes and internal nodes of a data set index for reuse
CN103020255B (en) Classification storage means and device
EP2863310B1 (en) Data processing method and apparatus, and shared storage device
CN109710572B (en) HBase-based file fragmentation method
CN108228649B (en) Method and apparatus for data access
CN110888837B (en) Object storage small file merging method and device
US10127254B2 (en) Method of index recommendation for NoSQL database
CN103229164B (en) Data access method and device
WO2017143957A1 (en) Data redistribution method and device
CN107622079A (en) Data storage, querying method and device
WO2016066108A1 (en) Route access method, route access system and user terminal
CN103973810A (en) Data processing method and device based on IP disk
CN103324533A (en) distributed data processing method, device and system
CN110781156A (en) Data node distribution method, equipment and medium
CN104657435A (en) Storage management method for application data and network management system
CN104598652B (en) A kind of data base query method and device
US11531666B1 (en) Indexing partitions using distributed bloom filters
US20130332465A1 (en) Database management device and database management method
WO2016192057A1 (en) Updating method and device for index table
CN115904211A (en) Storage system, data processing method and related equipment
CN114138180A (en) Method, device and equipment for deleting object and readable medium
CN111209304B (en) Data processing method, device and system
CN110968267B (en) Data management method, device, server and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240419

Address after: Room 1801, Floor 18, Jiyun Investment Building, No. 278, Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province, 450000

Applicant after: Zhengzhou Inspur Data Technology Co.,Ltd.

Country or region after: China

Address before: Room s311, building S05, Inspur Science Park, No. 1036, Inspur Road, Jinan area, China (Shandong) pilot Free Trade Zone, Jinan City, Shandong Province

Applicant before: Inspur(Jinan)Data Technology Co.,Ltd

Country or region before: China

GR01 Patent grant
GR01 Patent grant