CN113791730B - Method, system, device and storage medium for adjusting placement groups based on double storage pools - Google Patents

Method, system, device and storage medium for adjusting placement groups based on double storage pools Download PDF

Info

Publication number
CN113791730B
CN113791730B CN202110938494.8A CN202110938494A CN113791730B CN 113791730 B CN113791730 B CN 113791730B CN 202110938494 A CN202110938494 A CN 202110938494A CN 113791730 B CN113791730 B CN 113791730B
Authority
CN
China
Prior art keywords
placement
placement group
pool
group
groups
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
CN202110938494.8A
Other languages
Chinese (zh)
Other versions
CN113791730A (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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110938494.8A priority Critical patent/CN113791730B/en
Publication of CN113791730A publication Critical patent/CN113791730A/en
Application granted granted Critical
Publication of CN113791730B publication Critical patent/CN113791730B/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/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
    • 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/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • 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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 system, a device and a storage medium for adjusting a placement group based on a double storage pool, wherein the method comprises the following steps: dividing the double storage pool into a reference pool and a binding pool according to the number of the placed groups in the pool; traversing the placement groups in the access binding pool; when any placement group in the pool is bound, firstly, a currently accessed placement group PG1 and a corresponding placement group PG2 in the reference pool are obtained; then, it is judged whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node; if yes, continuing traversing the placement group in the access binding pool; if not, searching for an alternative placement group PG3 in the binding pool by adopting a traversal search mechanism; after finding, the placement group PG3 and the placement group PG2 are exchanged as a whole. The invention can lead the main bodies of the corresponding placement groups of the two binding storage pools to be on the same physical node as much as possible, reduce the pressure of the network, improve the performance of the storage cluster and improve the competitiveness of the product.

Description

Method, system, device and storage medium for adjusting placement groups based on double storage pools
Technical Field
The invention relates to the technical field of distributed storage, in particular to a method, a system, a device and a storage medium for adjusting a placement group based on a double storage pool.
Background
In a distributed storage system, stored contents are cut according to a fixed size, the fixed size data is called an object, PG (platform Group) is an aggregation of a plurality of objects, and is a logical concept, the PG and the objects are mapped by a consistent hash algorithm, and one PG corresponds to a plurality of objects. And each PG corresponds to an OSD (Object-based Storage Device, object storage device) 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 provided on one OSD, so that the content to be stored is placed on the disk. The storage pool is the aggregation of PGs.
In a distributed storage scenario, OSDs are typically deployed on a high-speed medium, such as an SSD (Solid State Disk), and partition areas are created by using these OSDs, an OSD is deployed on a low-speed medium HDD (Hard Disk Drive), and these OSDs are used to create a low-speed storage pool, and these two storage pools are bound together, so that all data requests from clients pass through this high-speed storage pool, and then it is determined by it whether the subsequent logic is to issue into the high-speed storage pool for processing, or forward into the low-speed storage 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.
However, when the storage cluster pressure reaches a certain level, if two corresponding PG masters are not on the same node, the two corresponding PG masters need to pass through the network to pass through, and once the network reaches a bottleneck, the forwarding speed is limited, so that the performance of the storage cluster cannot be expected.
Disclosure of Invention
Aiming at the problems, the invention aims to provide a method, a system, a device and a storage medium for adjusting a placement group based on double storage pools, which can enable the main bodies of the corresponding placement groups of two binding storage pools to be on the same physical node as much as possible, reduce the pressure of a network, improve the performance of a storage cluster and improve the competitiveness of products.
The invention aims to achieve the aim, and the aim is achieved by the following technical scheme: a dual storage pool based placement group adjustment method, comprising:
dividing the double storage pool into a reference pool and a binding pool according to the number of the placed groups in the pool;
traversing the placement groups in the access binding pool;
when any placement group in the binding pool is accessed, firstly, a current accessed placement group PG1 and a corresponding placement group PG2 in the reference pool are acquired; then, it is judged whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node;
if yes, continuing traversing the placement group in the access binding pool;
if not, searching for an alternative placement group PG3 in the binding pool by adopting a traversal search mechanism;
after finding, the placement group PG3 and the placement group PG2 are exchanged as a whole.
Further, the dividing the dual storage pool into a reference pool and a binding pool according to the number of placed groups in the pool includes:
acquiring the number of the placed groups in the two storage pools;
the storage pool with the small number of the placed groups is used as a reference pool, and the other storage pool is used as a binding pool.
Further, the obtaining the current placement group PG1 and the corresponding placement group PG2 in the reference pool includes:
acquiring a current placement group, namely PG1, and acquiring an IP address of a physical node where a main place of the placement group PG1 is located, namely IP1;
the placement group corresponding to the placement group PG1 in the reference pool is acquired and denoted as PG2, and the IP address of the physical node where the master of the placement group PG2 is located is acquired and denoted as IP2.
Further, the determining whether the masters of the placement group PG1 and the placement group PG2 are on the same physical node specifically includes: it is determined whether IP1 is identical to IP2.
Further, the searching the binding pool for the alternative placement group PG3 by using the traversal search mechanism comprises: sequentially traversing the placement groups after the placement group PG1 in the binding pool, and screening out candidate placement groups through a first screening mechanism in the traversing process;
an alternative placement group PG3 is determined among the candidate placement groups by a second screening mechanism.
Further, the first screening mechanism includes:
judging whether the IP address of the physical node where the main of the placement group is located is the same as IP2;
if not, continuing to traverse the next placement group;
if yes, judging whether the IP address of the physical node where the main of the placement group is located is the same as the IP address of the physical node where the main of the placement group is located in the reference pool;
if yes, continuing to traverse the next placement group; otherwise, the current placement set is a candidate placement set.
Further, the second screening mechanism includes:
if the IP address of the physical node where the main node of the corresponding placement group of the candidate placement group in the reference pool is located is the same as IP1, the candidate placement group is an alternative placement group PG3;
if the IP addresses of the physical nodes where the hosts of all the candidate placement groups are located in the corresponding placement groups in the reference pool are different from IP1, the first candidate placement group screened by the first screening mechanism is an alternative placement group PG3.
Correspondingly, the invention also discloses a system for adjusting the placement groups based on the double storage pools, which comprises the following steps: a storage pool identification unit, configured to divide the dual storage pool into a reference pool and a binding pool according to the number of groups placed in the pool; the traversing unit is used for traversing the placement groups in the access binding pool;
a reading unit, configured to obtain a currently accessed placement group PG1 and a placement group PG2 corresponding to the reference pool;
a judging unit configured to judge whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node; a searching unit, configured to search the binding pool for an alternative placement group PG3 by using a traversal searching mechanism;
and the interchange unit is used for integrally interchanging the placement group PG3 and the placement group PG2.
Correspondingly, the invention discloses a placement group adjusting device based on a double storage pool, which comprises the following components:
a memory for storing a dual memory pool based placement group adjustment program;
a processor, configured to implement the steps of the dual storage pool-based placement group adjustment method as described in any one of the preceding claims when executing the dual storage pool-based placement group adjustment program.
Accordingly, the present invention discloses a readable storage medium, on which a dual storage pool based placement group adjustment program is stored, which when executed by a processor, implements the steps of the dual storage pool based placement group adjustment method as described in any of the above.
Compared with the prior art, the invention has the beneficial effects that: the invention provides a method, a system, a device and a storage medium for adjusting placement groups based on double storage pools, which take storage pools with fewer placement groups as reference pools, take storage pools with more placement groups as binding pools, and change the placement group layout of the binding pools according to the reference pools. Specifically, a master of a placement group of a reference pool is obtained first, then a placement group of a binding pool is found according to a corresponding relation to be used as a reference placement group, and if the masters of the two placement groups are not on the same physical node, the placement group is the placement group to be adjusted. At this time, a placement group is found in the binding pool, the master of the placement group is on the same node as the master of the reference placement group, and the members of the placement group are exchanged with the members of the placement group to be adjusted as a whole. The method adjusts the placement groups, ensures that the placement groups are balanced and cannot be damaged, and enables two corresponding PGs to 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.
It can be seen that the present invention has outstanding substantial features and significant advances over the prior art, as well as the benefits of its implementation.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method of a first embodiment of the invention;
FIG. 2 is a first flow chart of a second embodiment of the present invention;
FIG. 3 is a second flow chart of a second embodiment of the present invention;
fig. 4 is a system configuration diagram of a third embodiment of the present invention.
In the figure, 1 is a storage pool identification unit; 2 is a traversing unit; 3 is a reading unit; 4 is a judging unit; and 5 is a search unit, and 6 is an exchange unit.
Detailed Description
The core of the invention is to provide a method for adjusting a placement group based on a dual storage pool, in the prior art, when the pressure of a storage cluster reaches a certain degree, in two binding storage pools, if two corresponding placement groups are not located on the same node, the two corresponding placement groups can be transferred through a network, and once the network reaches a bottleneck, the forwarding speed is limited, so that the performance of the storage cluster cannot be expected.
In the method for adjusting the placement groups based on the double storage pools, firstly, the storage pool with the smaller placement groups is used as a reference pool, and the storage pool with the larger placement groups is used as a binding pool. Then, firstly acquiring the main of the placement group of the reference pool, and then finding the placement group of the binding pool according to the corresponding relation to serve as the reference placement group, wherein if the main of the two placement groups is not on the same physical node, the placement group is the placement group to be adjusted. Finally, a placement group is found in the binding pool, the master of the placement group is on the same node with the master of the reference placement group, and the members of the placement group are exchanged with the members of the placement group to be adjusted. Therefore, the invention can lead the main bodies of the corresponding placement groups of the two binding storage pools to be on the same physical node as much as possible, reduce the pressure of the network, improve the performance of the storage cluster and improve the competitiveness of the product.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Embodiment one:
as shown in fig. 1, the present embodiment provides a method for adjusting a placement group based on a dual storage pool, including the following steps:
s1: the dual storage pool is divided into a reference pool and a binding pool according to the number of groups placed in the pool.
Firstly, obtaining the number of groups placed in two storage pools; then, the storage pool with the small number of placed groups is used as a reference pool, and the other storage pool is used as a binding pool.
S2: when any one of the placement groups in the binding pool is accessed, firstly, the current accessed placement group PG1 and the corresponding placement group PG2 in the reference pool are acquired.
Specifically, the current placement group is obtained and marked as PG1, and the IP address of the physical node where the main placement group PG1 is located is obtained and marked as IP1; the placement group corresponding to the placement group PG1 in the reference pool is acquired and denoted as PG2, and the IP address of the physical node where the master of the placement group PG2 is located is acquired and denoted as IP2.
S3: it is determined whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node. If yes, go to step S2; if not, go to step S4.
If IP1 is the same as IP2, the master of the placement group PG1 and the master of the placement group PG2 are on the same physical node; otherwise, the master of the placement group PG1 and the master of the placement group PG2 are not on the same physical node.
S4: the alternative placement group PG3 is searched in the binding pool using a traversal search mechanism. After finding, the placement group PG3 and the placement group PG2 are exchanged integrally, and after the exchange is completed, the process goes to step S2.
The process of searching the binding pool for the alternative placement group PG3 specifically comprises the following steps:
first, the placement groups following placement group PG1 are sequentially traversed within the binding pool, and candidate placement groups are screened out by the first screening mechanism on the traversal. An alternative placement group PG3 is determined among the candidate placement groups by a second screening mechanism.
The first screening mechanism specifically comprises:
and judging whether the IP address of the physical node where the main of the placement group is located is the same as IP2. If not, continuing to traverse the next placement group; if yes, judging whether the IP address of the physical node where the main of the placement group is located is the same as the IP address of the physical node where the main of the placement group is located in the reference pool. If yes, continuing to traverse the next placement group; otherwise, the current placement set is a candidate placement set.
The second screening mechanism is performed for each candidate placement group, and specifically includes:
firstly, judging whether the IP address of the physical node of the main place of the candidate place group corresponding to the place group in the reference pool is the same as IP1, if so, the candidate place group is an alternative place group PG3. If an alternative placement group PG3 cannot be determined from the candidate placement groups according to the judgment basis, the first candidate placement group screened by the first screening mechanism is taken as the alternative placement group PG3.
The embodiment provides a method for adjusting placement groups based on double storage pools, firstly, storage pools with fewer placement groups are used as reference pools, and storage pools with more placement groups are used as binding pools. Then, firstly acquiring the main of the placement group of the reference pool, and then finding the placement group of the binding pool according to the corresponding relation to serve as the reference placement group, wherein if the main of the two placement groups is not on the same physical node, the placement group is the placement group to be adjusted. Finally, a placement group is found in the binding pool, the master of the placement group is on the same node with the master of the reference placement group, and the members of the placement group are exchanged with the members of the placement group to be adjusted. The method adjusts the placement groups of the binding pools, ensures that the placement groups are balanced and cannot be damaged, and enables two corresponding PGs to 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.
Embodiment two:
based on the first embodiment, the invention also discloses a placement group adjusting method based on the double storage pools as shown in fig. 2 and 3. Wherein storage pool 1 is the reference pool and storage pool 2 is its binding pool. The storage pool 1 is sequentially provided with placement groups PG1.2, PG1.3 and PG1.4, and the placement groups corresponding to the storage pool 2, PG1.2, PG1.3 and PG1.4 are sequentially PG2.2, PG2.3 and PG2.4.
As shown in fig. 2, the placement groups of the storage pool 2 are traversed, and first, the placement groups PG2.2 are obtained, the primary of PG2.2 is 39, and the node is node 2. Then in storage pool 1, the set corresponding to PG2.2 is PG1.2, the master of PG1.2 is 31, and the node is node 1. Because the nodes where the main nodes of PG2.2 and PG1.2 are located are different, the storage pool 2 is continuously traversed backwards to place the group PG2.3, the nodes where the main nodes of PG2.3 and PG1.2 are located are all node 1, and the requirement is met, and then PG2.3 is selected as a candidate placement group. However, since PG2.3 is hosted on node 3 by the corresponding placement group PG1.3 in storage pool 1, if PG2.2 and PG2.3 are allowed to exchange members, when storage pool 2 traverses to PG2.3, replacement is still required because the corresponding placement group PG1.3 in storage pool 1 is hosted on node 3, and therefore, PG2.3 is not the most desirable candidate placement group, and replacement is temporarily not performed.
At this time, it is necessary to continue to traverse and screen other candidate placement groups for evaluation, as shown in fig. 3, to traverse the placement groups PG2.4 of the storage pool 2 backwards, where the primary node PG2.4 is on the node 1, which is the same as the node where the primary node 31 of PG1.2 is located, and the requirement is satisfied, that is, PG2.4 is also a candidate placement group. First, PG2.4 is acquired for the corresponding placement group PG1.4 in the storage pool 1, and PG1.4 is hosted on node 2. If members of PG2.4 and PG2.1 are interchanged, after the interchange, the node where the master of PG2.4 is located is node 2, and the master of PG1.4 corresponding to the node is also located on node 2, so that replacement is not required when the storage pool 2 traverses to PG2.4. Thus, PG2.4 is the most desirable candidate placement set, and PG2.4 is used as an alternative placement set for member exchange with PG 2.2.
In addition, if PG2.4 and the subsequent placement groups in storage pool 2 do not meet the requirements of the most desirable candidate placement groups even though they meet the requirements of the candidate placement groups, then PG2.3 is member interchanged with PG 2.2. And the other placement groups in the storage pool 2 are adjusted according to the steps described above.
Embodiment III:
based on the first embodiment, as shown in fig. 4, the present embodiment provides a placement group adjustment system based on dual storage pools, including: a storage pool identification unit 1, a traversing unit 2, a reading unit 3, a judging unit 4, a searching unit 5 and an exchanging unit 6.
A storage pool identification unit 1, configured to divide the dual storage pool into a reference pool and a binding pool according to the number of placement groups in the pool. The storage pool identification unit 1 is specifically configured to: acquiring the number of the placed groups in the two storage pools; the storage pool with the small number of the placed groups is used as a reference pool, and the other storage pool is used as a binding pool.
And the traversing unit 2 is used for traversing the placement groups in the access binding pool.
And a reading unit 3, configured to obtain the currently accessed placement group PG1 and a corresponding placement group PG2 in the reference pool. The reading unit 3 is specifically configured to: acquiring a current placement group, namely PG1, and acquiring an IP address of a physical node where a main place of the placement group PG1 is located, namely IP1; the placement group corresponding to the placement group PG1 in the reference pool is acquired and denoted as PG2, and the IP address of the physical node where the master of the placement group PG2 is located is acquired and denoted as IP2.
A judging unit 4 for judging whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node. I.e. whether IP1 is identical to IP2.
A search unit 5 for searching the binding pool for the alternative placement group PG3 using a traversal search mechanism. The search unit 5 is specifically configured to: sequentially traversing the placement groups after the placement group PG1 in the binding pool, and screening out candidate placement groups through a first screening mechanism in the traversing process; an alternative placement group PG3 is determined among the candidate placement groups by a second screening mechanism.
And an interchange unit 6, configured to integrally interchange the placement group PG3 and the placement group PG2.
The embodiment provides a placement group adjustment system based on double storage pools, which uses storage pools with fewer placement groups as reference pools, uses storage pools with more placement groups as binding pools, and changes the placement group layout of the binding pools according to the reference pools. Specifically, a master of a placement group of a reference pool is obtained first, then a placement group of a binding pool is found according to a corresponding relation to be used as a reference placement group, and if the masters of the two placement groups are not on the same physical node, the placement group is the placement group to be adjusted. At this time, a placement group is found in the binding pool, the master of the placement group is on the same node as the master of the reference placement group, and the members of the placement group are exchanged with the members of the placement group to be adjusted as a whole. The system adjusts the placement groups, so that the placement groups are balanced and cannot be damaged, and two corresponding PGs are mainly 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.
Embodiment four:
the embodiment discloses a placement group adjusting device based on a double storage pool, which comprises a processor and a memory; the processor executes the set adjustment program based on the double storage pools stored in the memory to realize the following steps:
1. the dual storage pool is divided into a reference pool and a binding pool according to the number of groups placed in the pool.
2. Traversing the set of placements within the access binding pool. When any placement group in the binding pool is accessed, firstly, a current accessed placement group PG1 and a corresponding placement group PG2 in the reference pool are acquired; then, it is determined whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node. If yes, continuing traversing the placement group in the access binding pool; if not, searching the alternative placement group PG3 in the binding pool by adopting a traversing search mechanism.
3. After finding, the placement group PG3 and the placement group PG2 are exchanged as a whole.
Further, the placement group adjustment device based on the dual storage pool in this embodiment may further include:
and the input interface is used for acquiring an externally imported placement group adjustment program based on the double storage pools, storing the acquired placement group adjustment program based on the double storage pools into the memory, and acquiring various instructions and parameters transmitted by external terminal equipment and transmitting the various instructions and parameters into the processor so that the processor can develop corresponding processing by utilizing the various instructions and parameters. In this embodiment, the input interface may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, and the like.
And the output interface is used for outputting various data generated by the processor to the terminal equipment connected with the output interface so that other terminal equipment connected with the output interface can acquire various data generated by the processor. In this embodiment, the output interface may specifically include, but is not limited to, a USB interface, a serial interface, and the like.
And the communication unit is used for establishing remote communication connection between the placement group adjusting device based on the double storage pools and the external server so that the placement group adjusting device based on the double storage pools can mount the image file to the external server. In this embodiment, the communication unit may specifically include, but is not limited to, a remote communication unit based on a wireless communication technology or a wired communication technology.
And the keyboard is used for acquiring various parameter data or instructions input by a user by knocking the key cap in real time.
And the display is used for running the related information of the short-circuit positioning process of the power supply line of the server to display in real time.
A mouse may be used to assist a user in inputting data and to simplify user operations.
The embodiment provides a placement group adjusting device based on double storage pools, which can enable the main bodies of the corresponding placement groups of two bound storage pools to be on the same physical node as much as possible, reduce the pressure of a network, improve the performance of a storage cluster and improve the competitiveness of products.
Fifth embodiment:
the present embodiment also discloses a readable storage medium, where the readable storage medium includes Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. The readable storage medium stores a dual storage pool based placement group adjustment program, which when executed by a processor, performs the steps of:
1. the dual storage pool is divided into a reference pool and a binding pool according to the number of groups placed in the pool.
2. Traversing the set of placements within the access binding pool. When any placement group in the binding pool is accessed, firstly, a current accessed placement group PG1 and a corresponding placement group PG2 in the reference pool are acquired; then, it is determined whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node. If yes, continuing traversing the placement group in the access binding pool; if not, searching the alternative placement group PG3 in the binding pool by adopting a traversing search mechanism.
3. After finding, the placement group PG3 and the placement group PG2 are exchanged as a whole.
The embodiment provides a readable storage medium, firstly, a storage pool with a smaller number of groups is placed as a reference pool, and a storage pool with a larger number of groups is placed as a binding pool. Then, firstly acquiring the main of the placement group of the reference pool, and then finding the placement group of the binding pool according to the corresponding relation to serve as the reference placement group, wherein if the main of the two placement groups is not on the same physical node, the placement group is the placement group to be adjusted. Finally, a placement group is found in the binding pool, the master of the placement group is on the same node with the master of the reference placement group, and the members of the placement group are exchanged with the members of the placement group to be adjusted.
In summary, the invention ensures that the balance of the placement groups is not destroyed, and can lead two corresponding PGs to be mainly on the same physical node as much as possible, thereby reducing the pressure of the network, improving the performance of the storage cluster and improving the competitiveness of the product.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. 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 invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems, and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, system or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit.
Similarly, each processing unit in the embodiments of the present invention may be integrated in one functional module, or each processing unit may exist physically, or two or more processing units may be integrated in one functional module.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The method, the system, the device and the readable storage medium for adjusting the placement groups based on the double storage pools provided by the invention are described in detail above. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (4)

1. A dual storage pool based placement group adjustment method, comprising:
dividing the double storage pool into a reference pool and a binding pool according to the number of the placed groups in the pool;
traversing the placement groups in the access binding pool;
when any placement group in the binding pool is accessed, firstly, a current accessed placement group PG1 and a corresponding placement group PG2 in the reference pool are acquired; then, it is judged whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node;
if yes, continuing traversing the placement group in the access binding pool;
if not, searching for an alternative placement group PG3 in the binding pool by adopting a traversal search mechanism;
after finding, carrying out integral exchange on the placement group PG3 and the placement group PG2;
the dividing the dual storage pool into a reference pool and a binding pool according to the number of the placed groups in the pool comprises:
acquiring the number of the placed groups in the two storage pools;
taking a storage pool with a small number of placed groups as a reference pool, and taking the other storage pool as a binding pool;
the obtaining the current placement group PG1 and the corresponding placement group PG2 in the reference pool includes:
acquiring a current placement group, namely PG1, and acquiring an IP address of a physical node where a main place of the placement group PG1 is located, namely IP1;
acquiring a placement group corresponding to the placement group PG1 in the reference pool, marking as PG2, and acquiring an IP address of a physical node where a main of the placement group PG2 is located, marking as IP2;
the determining whether the masters of the placement group PG1 and the placement group PG2 are on the same physical node specifically includes:
judging whether the IP1 is the same as the IP2;
the searching the alternative placement group PG3 in the binding pool by using the traversal search mechanism comprises:
sequentially traversing the placement groups after the placement group PG1 in the binding pool, and screening out candidate placement groups through a first screening mechanism in the traversing process;
determining an alternative placement group PG3 in the candidate placement groups through a second screening mechanism;
the first screening mechanism includes:
judging whether the IP address of the physical node where the main of the placement group is located is the same as IP2;
if not, continuing to traverse the next placement group;
if yes, judging whether the IP address of the physical node where the main of the placement group is located is the same as the IP address of the physical node where the main of the placement group is located in the reference pool;
if yes, continuing to traverse the next placement group; otherwise, the current placement set is a candidate placement set;
the second screening mechanism includes:
if the IP address of the physical node where the main node of the corresponding placement group of the candidate placement group in the reference pool is located is the same as IP1, the candidate placement group is an alternative placement group PG3;
if the IP addresses of the physical nodes where the hosts of all the candidate placement groups are located in the corresponding placement groups in the reference pool are different from IP1, the first candidate placement group screened by the first screening mechanism is an alternative placement group PG3.
2. A dual storage pool based placement group adjustment system, comprising:
a storage pool identification unit, configured to divide the dual storage pool into a reference pool and a binding pool according to the number of groups placed in the pool;
the traversing unit is used for traversing the placement groups in the access binding pool;
a reading unit, configured to obtain a currently accessed placement group PG1 and a placement group PG2 corresponding to the reference pool;
a judging unit configured to judge whether the masters of the placement group PG1 and the masters of the placement group PG2 are on the same physical node;
a searching unit, configured to search the binding pool for an alternative placement group PG3 by using a traversal searching mechanism;
the interchange unit is used for integrally interchange the placement group PG3 and the placement group PG2;
the storage pool identification unit is specifically configured to:
acquiring the number of the placed groups in the two storage pools;
taking a storage pool with a small number of placed groups as a reference pool, and taking the other storage pool as a binding pool;
the reading unit is specifically configured to:
acquiring a current placement group, namely PG1, and acquiring an IP address of a physical node where a main place of the placement group PG1 is located, namely IP1;
acquiring a placement group corresponding to the placement group PG1 in the reference pool, marking as PG2, and acquiring an IP address of a physical node where a main of the placement group PG2 is located, marking as IP2;
the judging unit is specifically configured to:
judging whether the IP1 is the same as the IP2;
the search unit is specifically configured to:
sequentially traversing the placement groups after the placement group PG1 in the binding pool, and screening out candidate placement groups through a first screening mechanism in the traversing process;
determining an alternative placement group PG3 in the candidate placement groups through a second screening mechanism;
the first screening mechanism includes:
judging whether the IP address of the physical node where the main of the placement group is located is the same as IP2;
if not, continuing to traverse the next placement group;
if yes, judging whether the IP address of the physical node where the main of the placement group is located is the same as the IP address of the physical node where the main of the placement group is located in the reference pool;
if yes, continuing to traverse the next placement group; otherwise, the current placement set is a candidate placement set;
the second screening mechanism includes:
if the IP address of the physical node where the main node of the corresponding placement group of the candidate placement group in the reference pool is located is the same as IP1, the candidate placement group is an alternative placement group PG3;
if the IP addresses of the physical nodes where the hosts of all the candidate placement groups are located in the corresponding placement groups in the reference pool are different from IP1, the first candidate placement group screened by the first screening mechanism is an alternative placement group PG3.
3. A dual storage pool based placement group adjustment device, comprising:
a memory for storing a dual memory pool based placement group adjustment program;
a processor, configured to implement the steps of the dual storage pool based placement group adjustment method as defined in claim 1 when executing the dual storage pool based placement group adjustment program.
4. A readable storage medium, characterized by: the readable storage medium having stored thereon a dual storage pool based placement group adjustment program which when executed by a processor performs the steps of the dual storage pool based placement group adjustment method of claim 1.
CN202110938494.8A 2021-08-16 2021-08-16 Method, system, device and storage medium for adjusting placement groups based on double storage pools Active CN113791730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110938494.8A CN113791730B (en) 2021-08-16 2021-08-16 Method, system, device and storage medium for adjusting placement groups based on double storage pools

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110938494.8A CN113791730B (en) 2021-08-16 2021-08-16 Method, system, device and storage medium for adjusting placement groups based on double storage pools

Publications (2)

Publication Number Publication Date
CN113791730A CN113791730A (en) 2021-12-14
CN113791730B true CN113791730B (en) 2024-02-20

Family

ID=79181800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110938494.8A Active CN113791730B (en) 2021-08-16 2021-08-16 Method, system, device and storage medium for adjusting placement groups based on double storage pools

Country Status (1)

Country Link
CN (1) CN113791730B (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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105187547A (en) * 2015-09-25 2015-12-23 浪潮(北京)电子信息产业有限公司 Load balancing method and 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
CN112181736A (en) * 2020-09-23 2021-01-05 星辰天合(北京)数据科技有限公司 Distributed storage system and configuration method thereof
CN112905118A (en) * 2021-02-19 2021-06-04 山东英信计算机技术有限公司 Cluster storage pool creating method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9052828B2 (en) * 2013-05-31 2015-06-09 International Business Machines Corporation Optimal volume placement across remote replication relationships

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105187547A (en) * 2015-09-25 2015-12-23 浪潮(北京)电子信息产业有限公司 Load balancing method and 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
CN112181736A (en) * 2020-09-23 2021-01-05 星辰天合(北京)数据科技有限公司 Distributed storage system and configuration method thereof
CN112905118A (en) * 2021-02-19 2021-06-04 山东英信计算机技术有限公司 Cluster storage pool creating method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于共享存储池的元数据服务器机群的设计研究;苏勇;周敬利;余胜生;姜明华;刘钢;;小型微型计算机系统(第04期);第160-163页 *

Also Published As

Publication number Publication date
CN113791730A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
US10545914B2 (en) Distributed object storage
US10776336B2 (en) Dynamic creation and maintenance of multi-column custom indexes for efficient data management in an on-demand services environment
CN113791730B (en) Method, system, device and storage medium for adjusting placement groups based on double storage pools
JP5466210B2 (en) Table search device, table search method, and table search system
CN106933871B (en) Short link processing method and device and short link server
US8239337B2 (en) Network device proximity data import based on weighting factor
CN104504003A (en) Graph data searching method and device
US10133673B2 (en) Cache optimization based on predictive routing
CN103970870A (en) Database query method and server
US10885085B2 (en) System to organize search and display unstructured data
US20140201132A1 (en) Storing a key value to a deleted row based on key range density
CN114691599A (en) Synthesis of network on chip (NoC) using performance constraints and targets
US9483523B2 (en) Information processing apparatus, distributed processing system, and distributed processing method
US20210377211A1 (en) Cross protocol association for internet addresses for metadata association systems and methods
CN104239337B (en) Processing method and processing device of tabling look-up based on TCAM
CN108140022A (en) Data query method and Database Systems
US20170364442A1 (en) Method for accessing data visitor directory in multi-core system and device
WO2014190700A1 (en) Method of memory access, buffer scheduler and memory module
CN107003932B (en) Cache directory processing method and directory controller of multi-core processor system
CN117608856A (en) Memory expansion method, system, terminal and storage medium for NVMe (network video Me) acceleration card
CN106796588A (en) The update method and equipment of concordance list
CN112486988A (en) Data processing method, device, equipment and storage medium
CN105765542A (en) Method for accessing files, distributed storage system and storage node
CN106302259B (en) Method and router for processing message in network on chip
CN110598072B (en) Feature data aggregation method and device

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
GR01 Patent grant
GR01 Patent grant