Method, device, equipment and readable medium for selecting members of distributed file system PG

By using the crush algorithm and upmap correction table in a distributed storage cluster, the data loss problem caused by uneven distribution of PG members is solved, ensuring that members meet the fault domain and avoiding business stuck.

CN114138736BActive Publication Date: 2025-03-11JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111276654.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-03-11
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In a distributed storage cluster, the distribution of PG members is uneven, which causes PG members to not meet the fault domain when a failure occurs, causing data loss.

Method used

The new members of PG are calculated through the crush algorithm and upmap correction table, and in response to OSD failures, the member list is recalculated and corrected to ensure that the new members comply with the fault domain.

Benefits of technology

Ensure that the selected PG members are in compliance with the fault domain and avoid front-end service jams and data loss caused by failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114138736B_ABST
    Figure CN114138736B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and readable medium for selecting members of a distributed file system PG, the method comprising: in response to a member failure in an OSD, calculating new members of the PG in the OSD where the failure occurs by using a crush algorithm and an upmap correction table; in response to information synchronization of the PG, judging whether the new members of the PG in the OSD where the failure occurs conform to the failure domain; in response to the new members of the PG in the OSD where the failure occurs not conforming to the failure domain, deleting the new members of the PG in the OSD, making the OSD where the failure occurs in a waiting state and sending a message to a monitor; in response to the monitor receiving the message, clearing the information in the upmap correction table and sending a new osdmap table to the OSD where the failure occurs; the OSD where the failure occurs selects members in the new osdmap table as members of the PG. By using the scheme of the present invention, it is possible to ensure that the selected members conform to the failure domain, and avoid the problems of front-end service jamming and data loss caused by failures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and more specifically to a method, device, equipment and readable medium for selecting members of a distributed file system PG. Background Art

[0002] For distributed storage clusters, PG (Placement Group, a logical unit of data distribution) members are obtained through the crush algorithm. The crush algorithm is a pseudo-random algorithm, and the calculated PG member distribution is not very balanced. In order to improve the capacity utilization of the cluster, the upmap algorithm is introduced. The upmap algorithm will eventually obtain a correction table, which is used to correct the PG member list, and finally achieve a balanced distribution of PG.

[0003] Through the correction of the crush algorithm and the upmap correction table, we can achieve the purpose of PG balance. The members of PG are required to comply with the fault domain. The up members calculated by the cursh algorithm comply with the fault domain. The correction table calculated by the upmap algorithm also complies with the fault domain after replacement. However, when a fault occurs, the members of PG change. At this time, the crush algorithm calculates the new up members, but the correction table of the upmap algorithm has the probability of making the up members of PG not comply with the fault domain, which may eventually result in data loss when superimposed faults occur. Summary of the invention

[0004] In view of this, the purpose of the embodiments of the present invention is to propose a method, device, equipment and readable medium for selecting members of a distributed file system PG. By using the technical solution of the present invention, it is possible to ensure that the selected members comply with the fault domain and avoid the problems of front-end business jams and data loss caused by failures.

[0005] Based on the above purpose, one aspect of an embodiment of the present invention provides a method for selecting members of a distributed file system PG, comprising the following steps:

[0006] In response to a member failure in an OSD (Object-based Storage Device), a new member of the PG in the failed OSD is calculated through the crush algorithm and upmap correction table;

[0007] In response to the PG performing information synchronization, determine whether the new member of the PG in the failed OSD meets the failure domain;

[0008] In response to the new member of the PG in the failed OSD not conforming to the failure domain, deleting the new member of the PG in the OSD and placing the failed OSD in a waiting state and sending a message to the monitor;

[0009] In response to the monitor receiving the message, the monitor clears the information in the upmap correction table and sends a new osdmap table to the failed OSD;

[0010] The failed OSD selects members from the new osdmap table as members of the PG.

[0011] According to one embodiment of the present invention, in response to a member failure in an OSD, a new member of a PG in the OSD where the failure is corrected by a crush algorithm and an upmap is calculated, including:

[0012] In response to a member failure in the OSD, clearing the member in the failed OSD;

[0013] Use the crush algorithm to recalculate the members of the failed OSD, and use the upmap algorithm to calculate the correction table of the failed OSD;

[0014] Use the correction table to correct the members calculated by the crush algorithm, and the faulty OSD selects the corrected members as members of the PG.

[0015] According to an embodiment of the present invention, in response to PG performing information synchronization, determining whether a new member of a PG in a failed OSD meets the fault domain includes:

[0016] In response to PG performing information synchronization, obtain the node information where the new member of PG is located;

[0017] Determine whether each new member has the same node information;

[0018] In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

[0019] According to one embodiment of the present invention, it also includes:

[0020] In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

[0021] Another aspect of the embodiment of the present invention further provides a device for selecting members of a distributed file system PG, the device comprising:

[0022] A calculation module, wherein the calculation module is configured to calculate a new member of a PG in the failed OSD through a crush algorithm and an upmap correction table in response to a member failure in the OSD;

[0023] A judgment module, wherein the judgment module is configured to judge whether a new member of a PG in a failed OSD conforms to a failure domain in response to information synchronization of the PG;

[0024] A deletion module, wherein the deletion module is configured to delete the new member of the PG in the OSD and put the failed OSD in a waiting state and send a message to the monitor in response to the new member of the PG in the failed OSD not conforming to the failure domain;

[0025] A processing module, wherein the processing module is configured to clear the information in the upmap correction table and send a new osdmap table to the failed OSD in response to the monitor receiving the message;

[0026] A selection module is configured for the failed OSD to select a member in a new osdmap table as a member of the PG.

[0027] According to one embodiment of the present invention, the calculation module is further configured as follows:

[0028] In response to a member failure in the OSD, clearing the member in the failed OSD;

[0029] Use the crush algorithm to recalculate the members of the failed OSD, and use the upmap algorithm to calculate the correction table of the failed OSD;

[0030] Use the correction table to correct the members calculated by the crush algorithm, and the faulty OSD selects the corrected members as members of the PG.

[0031] According to one embodiment of the present invention, the judgment module is further configured to:

[0032] In response to PG performing information synchronization, obtain the node information where the new member of PG is located;

[0033] Determine whether each new member has the same node information;

[0034] In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

[0035] According to one embodiment of the present invention, the judgment module is further configured to:

[0036] In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

[0037] Another aspect of the embodiments of the present invention further provides a computer device, the computer device comprising:

[0038] at least one processor; and

[0039] The memory stores computer instructions executable on the processor, and the instructions implement the steps of any one of the above methods when executed by the processor.

[0040] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0041] The present invention has the following beneficial technical effects: the method for selecting PG members of a distributed file system provided by an embodiment of the present invention, in response to a member failure in an OSD, calculates new members of the PG in the OSD where the failure occurs by using a crush algorithm and an upmap correction table; in response to information synchronization of the PG, determines whether the new members of the PG in the OSD where the failure occurs conform to the failure domain; in response to the new members of the PG in the OSD where the failure occurs not conforming to the failure domain, deletes the new members of the PG in the OSD, puts the OSD where the failure occurs in a waiting state, and sends a message to a monitor; in response to the monitor receiving the message, clears the information in the upmap correction table and sends a new osdmap table to the OSD where the failure occurs; the technical solution that the OSD where the failure occurs selects members in the new osdmap table as members of the PG can ensure that the selected members conform to the failure domain, and avoids the problems of front-end business jams and data loss caused by failures. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A schematic flow chart of a method for selecting members for a distributed file system PG according to an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of a device for selecting members for a distributed file system PG according to an embodiment of the present invention;

[0045] Figure 3 is a schematic diagram of a computer device according to an embodiment of the present invention;

[0046] Figure 4 FIG. 1 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0048] Based on the above objectives, a first aspect of an embodiment of the present invention provides an embodiment of a method for selecting members of a distributed file system PG. Figure 1 Shown is a schematic flow chart of the method.

[0049] like Figure 1 As shown in , the method may include the following steps:

[0050] In response to a member failure in the OSD, S1 calculates new members of the PG in the failed OSD through the crush algorithm and upmap correction table.

[0051] When a member of an OSD fails, that is, a PG fails, it is necessary to reselect members for the OSD. After all members of the failed OSD are cleared, the PG members of the OSD are calculated using the crush algorithm. However, the crush algorithm is a pseudo-random algorithm, and the calculated distribution of PG members is not very balanced. In order to improve the capacity utilization of the cluster, the upmap algorithm needs to be used. The upmap algorithm will eventually produce a correction table, and then use the correction table to correct the PG members calculated by the crush algorithm. The corrected members are the new members of the OSD.

[0052] S2 performs information synchronization in response to PG and determines whether the new member of PG in the failed OSD conforms to the fault domain.

[0053] After the new members are selected, the information synchronization process between PGs will be carried out. During this process, it is necessary to determine whether the selected PG members comply with the fault domain, that is, obtain the node information of each PG's new members, and determine whether each new member has the same node information. If the new members have the same node information, it is determined that the new members of the PG do not comply with the fault domain. If the new members do not have the same node information, that is, each PG member is distributed on different nodes, then it is determined that the new members of the PG comply with the fault domain. If it is determined that the new members of the PG all comply with the fault domain, the information synchronization process is completed.

[0054] In response to the new member of the PG in the failed OSD not conforming to the fault domain, S3 deletes the new member of the PG in the OSD and puts the failed OSD in a waiting state and sends a message to the monitor.

[0055] If it is determined that the new member of the PG does not conform to the fault domain, it is necessary to select new members again. After deleting all the selected members, the OSD is put into a waiting state and a message is sent to the monitor to trigger the action of reselecting members.

[0056] S4 responds to the monitor receiving the message, clears the information in the upmap correction table, and then sends the new osdmap table to the failed OSD.

[0057] After receiving the message, the monitor will delete the correction table calculated using the upmap algorithm, and send the osdmap table of the PG member calculated using the crush algorithm to the OSD, that is, the PG member in the osdmap table is not corrected.

[0058] The OSD with S5 failure selects the members in the new osdmap table as members of the PG.

[0059] After receiving the osdmap table, the OSD selects the PG in the table as a member of the PG, and then performs the information synchronization process.

[0060] Through the technical solution of the present invention, it is possible to ensure that the selected members comply with the fault domain, thereby avoiding the problems of front-end business jams and data loss caused by faults.

[0061] In a preferred embodiment of the present invention, in response to a member failure in an OSD, a new member of a PG in the OSD that has failed is calculated by a crush algorithm and an upmap correction table, including:

[0062] In response to a member failure in the OSD, clearing the member in the failed OSD;

[0063] Use the crush algorithm to recalculate the members of the failed OSD, and use the upmap algorithm to calculate the correction table of the failed OSD;

[0064] Use the correction table to correct the members calculated by the crush algorithm. The faulty OSD selects the corrected members as the members of the PG. The crush algorithm is a pseudo-random algorithm. The distribution of PG members calculated is not very balanced. In order to improve the capacity utilization of the cluster, the upmap algorithm needs to be used. The upmap algorithm will eventually produce a correction table, and then use the correction table to correct the PG members calculated by the crush algorithm. The corrected members are the new members of the OSD.

[0065] In a preferred embodiment of the present invention, in response to the PG performing information synchronization, determining whether a new member of the PG in the failed OSD meets the failure domain includes:

[0066] In response to PG performing information synchronization, obtain the node information where the new member of PG is located;

[0067] Determine whether each new member has the same node information;

[0068] In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

[0069] In a preferred embodiment of the present invention, it also includes:

[0070] In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

[0071] Through the technical solution of the present invention, it is possible to ensure that the selected members comply with the fault domain, thereby avoiding the problems of front-end business jams and data loss caused by faults.

[0072] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiment can achieve the same or similar effect as any of the above-mentioned method embodiments corresponding thereto.

[0073] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a CPU, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0074] Based on the above purpose, a second aspect of the embodiment of the present invention provides a device for selecting members of a distributed file system PG, such as Figure 2 As shown, the device 200 includes:

[0075] A calculation module, wherein the calculation module is configured to calculate a new member of a PG in the failed OSD through a crush algorithm and an upmap correction table in response to a member failure in the OSD;

[0076] A judgment module, wherein the judgment module is configured to judge whether a new member of a PG in a failed OSD conforms to a failure domain in response to information synchronization of the PG;

[0077] A deletion module, wherein the deletion module is configured to delete the new member of the PG in the OSD and put the failed OSD in a waiting state and send a message to the monitor in response to the new member of the PG in the failed OSD not conforming to the failure domain;

[0078] A processing module, wherein the processing module is configured to clear the information in the upmap correction table and send a new osdmap table to the failed OSD in response to the monitor receiving the message;

[0079] A selection module is configured for the failed OSD to select a member in a new osdmap table as a member of the PG.

[0080] In a preferred embodiment of the present invention, the calculation module is further configured as follows:

[0081] In response to a member failure in the OSD, clearing the member in the failed OSD;

[0082] Use the crush algorithm to recalculate the members of the failed OSD, and use the upmap algorithm to calculate the correction table of the failed OSD;

[0083] Use the correction table to correct the members calculated by the crush algorithm, and the faulty OSD selects the corrected members as members of the PG.

[0084] In a preferred embodiment of the present invention, the judgment module is further configured to:

[0085] In response to PG performing information synchronization, obtain the node information where the new member of PG is located;

[0086] Determine whether each new member has the same node information;

[0087] In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

[0088] In a preferred embodiment of the present invention, the judgment module is further configured to:

[0089] In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

[0090] Based on the above purpose, a third aspect of an embodiment of the present invention provides a computer device. Figure 3 FIG. 2 is a schematic diagram of an embodiment of a computer device provided by the present invention. Figure 3 As shown, the embodiment of the present invention includes the following apparatus: at least one processor 21; and a memory 22, the memory 22 stores computer instructions 23 that can be run on the processor, and when the instructions are executed by the processor, the following method is implemented:

[0091] In response to a member failure in an OSD, the new member of the PG in the failed OSD is calculated through the crush algorithm and upmap correction table;

[0092] In response to the PG performing information synchronization, determine whether the new member of the PG in the failed OSD meets the failure domain;

[0093] In response to the new member of the PG in the failed OSD not conforming to the failure domain, deleting the new member of the PG in the OSD and placing the failed OSD in a waiting state and sending a message to the monitor;

[0094] In response to the monitor receiving the message, the monitor clears the information in the upmap correction table and sends a new osdmap table to the failed OSD;

[0095] The failed OSD selects members from the new osdmap table as members of the PG.

[0096] In a preferred embodiment of the present invention, in response to a member failure in an OSD, a new member of a PG in the OSD that has failed is calculated by a crush algorithm and an upmap correction table, including:

[0097] In response to a member failure in the OSD, clearing the member in the failed OSD;

[0098] Use the crush algorithm to recalculate the members of the failed OSD, and use the upmap algorithm to calculate the correction table of the failed OSD;

[0099] Use the correction table to correct the members calculated by the crush algorithm, and the faulty OSD selects the corrected members as members of the PG.

[0100] In a preferred embodiment of the present invention, in response to the PG performing information synchronization, determining whether a new member of the PG in the failed OSD meets the failure domain includes:

[0101] In response to PG performing information synchronization, obtain the node information where the new member of PG is located;

[0102] Determine whether each new member has the same node information;

[0103] In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

[0104] In a preferred embodiment of the present invention, it also includes:

[0105] In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

[0106] Based on the above purpose, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium. Figure 4 FIG. 2 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 4 As shown, the computer readable storage medium 31 stores a computer program 32 that performs the following method when executed by a processor:

[0107] In response to a member failure in an OSD, the new member of the PG in the failed OSD is calculated through the crush algorithm and upmap correction table;

[0108] In response to the PG performing information synchronization, determine whether the new member of the PG in the failed OSD meets the failure domain;

[0109] In response to the new member of the PG in the failed OSD not conforming to the failure domain, deleting the new member of the PG in the OSD and placing the failed OSD in a waiting state and sending a message to the monitor;

[0110] In response to the monitor receiving the message, the monitor clears the information in the upmap correction table and sends a new osdmap table to the failed OSD;

[0111] The failed OSD selects members from the new osdmap table as members of the PG.

[0112] In a preferred embodiment of the present invention, in response to a member failure in an OSD, a new member of a PG in the OSD that has failed is calculated by a crush algorithm and an upmap correction table, including:

[0113] In response to a member failure in the OSD, clearing the member in the failed OSD;

[0114] Use the crush algorithm to recalculate the members of the failed OSD, and use the upmap algorithm to calculate the correction table of the failed OSD;

[0115] Use the correction table to correct the members calculated by the crush algorithm, and the faulty OSD selects the corrected members as members of the PG.

[0116] In a preferred embodiment of the present invention, in response to the PG performing information synchronization, determining whether a new member of the PG in the failed OSD meets the failure domain includes:

[0117] In response to PG performing information synchronization, obtain the node information where the new member of PG is located;

[0118] Determine whether each new member has the same node information;

[0119] In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

[0120] In a preferred embodiment of the present invention, it also includes:

[0121] In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

[0122] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0123] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.

[0124] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0125] In one or more exemplary designs, the function can be implemented in hardware, software, firmware or any combination thereof. If implemented in software, the function can be stored on a computer-readable medium or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include computer storage media and communication media, and the communication media include any media that helps to transfer a computer program from one location to another. The storage medium can be any available medium that can be accessed by a general or special computer. As an example and not limiting, the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of an instruction or data structure and can be accessed by a general or special computer or a general or special processor. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwaves are used to send software from a website, server or other remote source, the above-mentioned coaxial cable, optical fiber cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwaves are all included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, Blu-ray disc, wherein disks usually reproduce data magnetically, while optical discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0126] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0127] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0128] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0129] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0130] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A method for selecting members of a distributed file system PG, characterized in that: The following steps are involved: In response to a member failure in an OSD, the new member of the PG in the failed OSD is calculated through the crush algorithm and upmap correction table; In response to the PG performing information synchronization, determine whether the new member of the PG in the failed OSD meets the failure domain; In response to the new member of the PG in the failed OSD not conforming to the failure domain, deleting the new member of the PG in the OSD and placing the failed OSD in a waiting state and sending a message to the monitor; In response to the monitor receiving the message, the monitor clears the information in the upmap correction table and sends a new osdmap table to the failed OSD; The failed OSD selects the members in the new osdmap table as members of the PG; Among them, in response to a member failure in the OSD, new members of the PG in the failed OSD are calculated through the crush algorithm and the upmap correction table, including: in response to a member failure in the OSD, the members in the failed OSD are cleared; the members of the failed OSD are recalculated using the crush algorithm, and a correction table of the failed OSD is calculated through the upmap algorithm; the members calculated by the crush algorithm are corrected using the correction table, and the failed OSD selects the corrected members as members of the PG.

2. The method according to claim 1, characterized in that In response to the PG performing information synchronization, determining whether the new member of the PG in the failed OSD meets the failure domain includes: In response to PG performing information synchronization, obtain the node information where the new member of PG is located; Determine whether each new member has the same node information; In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

3. The method according to claim 2, characterized in that Also includes: In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

4. A device for selecting members of a distributed file system PG, characterized in that: The device comprises: A calculation module, wherein the calculation module is configured to calculate a new member of a PG in the failed OSD through a crush algorithm and an upmap correction table in response to a member failure in the OSD; A judgment module, wherein the judgment module is configured to judge whether a new member of a PG in a failed OSD conforms to a failure domain in response to information synchronization of the PG; A deletion module, wherein the deletion module is configured to delete the new member of the PG in the OSD and put the failed OSD in a waiting state and send a message to the monitor in response to the new member of the PG in the failed OSD not conforming to the failure domain; A processing module, wherein the processing module is configured to clear the information in the upmap correction table and send a new osdmap table to the failed OSD in response to the monitor receiving the message; A selection module, wherein the selection module is configured for the failed OSD to select a member in a new osdmap table as a member of the PG; Among them, the calculation module is also configured to: in response to a member failure in the OSD, clear the members in the failed OSD; use the crush algorithm to recalculate the members of the failed OSD, and calculate the correction table of the failed OSD through the upmap algorithm; use the correction table to correct the members calculated by the crush algorithm, and the failed OSD selects the corrected members as members of the PG.

5. The device according to claim 4, characterized in that The judging module is further configured as follows: In response to PG performing information synchronization, obtain the node information where the new member of PG is located; Determine whether each new member has the same node information; In response to the presence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD does not conform to the failure domain.

6. The device according to claim 5, characterized in that The judging module is further configured as follows: In response to the absence of identical node information in the new member, it is determined that the new member of the PG in the failed OSD complies with the failure domain.

7. A computer device, characterized in that: include: at least one processor; as well as A memory, wherein the memory stores computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 3.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Distributed safety memory system

    CN101316273A

  • Selection method, device, storage pool and distributed file system of PG member

    CN106503237A