CN111666035A - Management method and device of distributed storage system - Google Patents

Management method and device of distributed storage system Download PDF

Info

Publication number
CN111666035A
CN111666035A CN201910164730.8A CN201910164730A CN111666035A CN 111666035 A CN111666035 A CN 111666035A CN 201910164730 A CN201910164730 A CN 201910164730A CN 111666035 A CN111666035 A CN 111666035A
Authority
CN
China
Prior art keywords
metadata management
management nodes
group
node
mount table
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.)
Granted
Application number
CN201910164730.8A
Other languages
Chinese (zh)
Other versions
CN111666035B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910164730.8A priority Critical patent/CN111666035B/en
Publication of CN111666035A publication Critical patent/CN111666035A/en
Application granted granted Critical
Publication of CN111666035B publication Critical patent/CN111666035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms

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 discloses a management method and a device of a distributed storage system, relating to the technical field of computers; the main technical scheme is as follows: receiving update information of a mount table through a first group of metadata management nodes, wherein the mount table is used for providing a mapping relation corresponding to the N group of metadata management nodes; wherein the N groups of metadata management nodes comprise the first group of metadata management nodes; synchronizing the update information of the mount table to the rest N-1 groups of metadata management nodes by using the first group of metadata management nodes; and accessing the client based on the updated mounting table.

Description

Management method and device of distributed storage system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a management method and apparatus for a distributed storage system.
Background
The mount table in the distributed storage system is crucial in the distributed storage system because the client corresponding to the distributed storage system locates the data to be accessed through the mount table and completes the access of the data according to the location.
At present, the management of mount tables in a distributed storage system generally adopts the following two methods: one is that the mount table is managed by the user of the distributed storage system himself. When the mount table is updated to the new mount table, the user needs to manually update the mount table in each client, so that the mount table in each client is consistent with the new mount table. However, because the mount table is manually maintained by a user, when the mount table is updated, it may be missed that a particular client is not updated or a new mount table is not updated to the client due to improper update operation, so that the mount table in the client is inconsistent with the new mount table in the distributed storage system. The other is to manage the mount table by means of a service system of an external distributed storage system. When the external service system updates the mount table, once the external service system stops or erroneously updates the mount table, the mount table obtained by the client from the external service system is inconsistent with the mount table in the distributed storage system, so that an access error occurs when the client accesses the distributed storage system by using the mount table in the external service system.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for managing a distributed storage system, and mainly aims to improve consistency between a mount table used by a client and a mount table in the distributed storage system.
In a first aspect, an embodiment of the present invention provides a management method for a distributed storage system, including:
receiving update information of a mount table through a first group of metadata management nodes, wherein the mount table is used for providing a mapping relation corresponding to the N group of metadata management nodes; wherein the N groups of metadata management nodes comprise the first group of metadata management nodes;
synchronizing the update information of the mount table to the rest N-1 groups of metadata management nodes by using the first group of metadata management nodes;
and accessing the client based on the updated mounting table.
In a second aspect, an embodiment of the present invention provides a management method for a distributed storage system, where the method is applied to a client, and includes:
accessing an updated mount table in any group of metadata management nodes based on the address information of the N group of metadata management nodes of the distributed storage system;
and executing access operation on the distributed storage system based on the accessed updated mounting table.
In a third aspect, an embodiment of the present invention provides a management apparatus for a distributed storage system, where the apparatus includes:
the receiving unit is used for receiving the updating information of a mounting table through a first group of metadata management nodes, wherein the mounting table is used for providing a mapping relation corresponding to the N group of metadata management nodes; wherein the N groups of metadata management nodes comprise the first group of metadata management nodes;
the synchronization unit is used for synchronizing the updating information of the mounting table to the rest N-1 groups of metadata management nodes by utilizing the first group of metadata management nodes;
and the providing unit is used for providing access for the client based on the updated mounting table.
In a fourth aspect, an embodiment of the present invention provides a management apparatus for a distributed storage system, where the apparatus is applied to a client, and includes:
the first access unit is used for accessing the updated mount table in any group of metadata management nodes based on the address information of the N group of metadata management nodes of the distributed storage system;
and the operation unit is used for executing access operation on the distributed storage system based on the accessed updated mounting table.
In a fifth aspect, an embodiment of the present invention provides a distributed storage system, where the system includes:
the system comprises N groups of metadata management nodes, wherein a first group of metadata management nodes are used for receiving the updating information of a mounting table and synchronizing the updating information of the mounting table to the rest N-1 groups of metadata management nodes; the mounting table is used for providing a mapping relation corresponding to the N groups of metadata management nodes;
and the client is used for accessing the updated mounting table.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, where the storage medium includes a stored program, where the program, when running, controls a device on the storage medium to execute the management method for the distributed storage system in any one of the first aspects, or execute the management method for the distributed storage system in any one of the second aspects.
In a seventh aspect, an embodiment of the present invention provides a storage management apparatus, where the storage management apparatus includes a memory, configured to store a program; a processor, coupled to the memory, for executing the program to perform the management method of the distributed storage system according to any one of the first aspect, or the management method of the distributed storage system according to any one of the second aspect.
The embodiment of the invention provides a management method and a management device of a distributed storage system. According to the scheme, the mounting table used by the client and the mounting table in the distributed storage system are synchronized without manual intervention, the mounting table is not required to be maintained by means of external services during synchronization, and the client can access the mounting table based on the updated mounting table. Because the client directly accesses the new version mounting table in the metadata management node, the scheme provided by the invention can improve the consistency of the mounting table used by the client and the mounting table in the distributed storage system.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for managing a distributed storage system according to an embodiment of the present invention;
FIG. 2A is a flow chart illustrating a method for managing a distributed storage system according to another embodiment of the present invention;
FIG. 2B is a flowchart illustrating a method for managing a distributed storage system according to another embodiment of the present invention;
FIG. 3 is a flow chart illustrating a method for managing a distributed storage system according to yet another embodiment of the present invention;
FIG. 4 is a flow chart illustrating a method for managing a distributed storage system according to yet another embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating a management apparatus of a distributed storage system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram illustrating a management apparatus of a distributed storage system according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram illustrating a management apparatus of a distributed storage system according to yet another embodiment of the present invention;
fig. 8 is a schematic structural diagram illustrating a management apparatus of a distributed storage system according to yet another embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a distributed storage system according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram illustrating a distributed storage system according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, an embodiment of the present invention provides a management method for a distributed storage system, where the method includes:
101. receiving update information of a mount table through a first group of metadata management nodes, wherein the mount table is used for providing a mapping relation corresponding to the N group of metadata management nodes; wherein the N sets of metadata management nodes comprise the first set of metadata management nodes.
102. And synchronizing the updating information of the mounting table to the rest N-1 groups of metadata management nodes by utilizing the first group of metadata management nodes.
103. And accessing the client based on the updated mounting table.
According to the embodiment shown in fig. 1, in the embodiment of the present invention, the mount table used by the client and the mount table in the distributed storage system are synchronized without human intervention, and the mount table is not maintained by means of an external service during synchronization, and is accessed by the client based on the updated mount table. Because the client directly accesses the new version mounting table in the metadata management node, the scheme provided by the embodiment of the invention can improve the consistency of the mounting table used by the client and the mounting table in the distributed storage system.
In one embodiment of the invention, a mount table in a distributed storage system records a mapping relationship from a directory to a metadata management node. In the mapping relation, one directory or a plurality of directories correspond to a group of metadata management nodes. Alternatively, a directory may include, but is not limited to, a data storage path stored in a volume. For example, the following steps are carried out: the mapping relation between the directory "/dir/path/dir 1/fileA" and the A group metadata management node exists in the mount table.
In one embodiment of the invention, N groups of metadata management nodes exist in the distributed storage system, and N is an integer greater than or equal to 1. A first group of metadata management nodes exist in the N groups of metadata management nodes, and the first group of metadata management nodes serve as default nodes and are responsible for receiving the updating information of the mounting table. It should be noted that the first metadata management node may be selected from the N sets of metadata management nodes according to the following rules: first, randomly selecting any group of metadata management nodes as a first group of metadata management nodes. And secondly, selecting a group of metadata management nodes with the minimum load as a first group of metadata management nodes, so that the group of metadata management nodes can quickly process the updated information.
In an embodiment of the present invention, the receiving, by the first group metadata management node, the update information of the mount table according to step 101 in the flowchart shown in fig. 1 may include: acquiring an updating request carrying a mapping relation to be updated through a first group of metadata management nodes; inquiring a current latest mounting table of the distributed storage system, and determining updating position information corresponding to the mapping relation to be updated; and obtaining the updating information based on the updating position information and the mapping relation to be updated. Wherein the update information is used for updating the mounting table.
Specifically, the process of obtaining the update request carrying the mapping relationship to be updated at least includes: inquiring whether a mapping relation to be updated exists in a preset specified file or not at a set period; and if so, acquiring an updating request, wherein the updating request carries the mapping relation to be updated. It can be seen that, since the update request is automatically obtained when the mapping relationship to be updated exists in the specified file, the mount table can be automatically updated dynamically based on the specified file. The specific file may be a file stored in a specific location, and the specific location may be a management service platform such as nuwa and fuxi.
In this embodiment, the mapping relationship to be updated may include, but is not limited to, at least one of deleting the mapping relationship between the directory and the metadata management node, modifying the mapping relationship between the directory and the metadata management node, and adding the mapping relationship between the directory and the metadata management node. The mounting table records the mapping relationship from the directory to the metadata management node.
When the update request carries the mapping relation between the deleted directory and the metadata management node, the current latest version of the mount table of the distributed storage system is inquired, the mapping relation which is the same as the mapping relation between the deleted directory and the metadata management node in the mount table is determined as a target mapping relation, and the recording position of the target mapping relation is determined as the update position information corresponding to the mapping relation between the deleted directory and the metadata management node. The obtained update information includes the mapping relationship between the directory and the metadata management node and the corresponding relationship between the directory and the update location information.
When the update request carries the mapping relation between the modification directory and the metadata management node, inquiring a current latest version mounting table of the distributed storage system, determining the mapping relation in the mounting table, which is the same as the mapping relation between the modification directory and the metadata management node, as a target mapping relation, and determining the recording position of the target mapping relation as update position information corresponding to the mapping relation between the modification directory and the metadata management node. The obtained update information includes the mapping relationship between the modification directory and the metadata management node and the corresponding relationship between the modification directory and the update location information.
When the update request carries the mapping relation between the newly added directory and the metadata management node and the current latest version of the mount table of the distributed storage system is inquired, the recording position of the mapping relation between the newly added directory and the metadata management node in the mount table is determined, and the determined recording position is determined as the update position information corresponding to the mapping relation between the newly added directory and the metadata management node. The obtained updating information comprises the mapping relation between the newly added directory and the metadata management node and the corresponding relation between the newly added directory and the updating position information. It should be noted that the record position of the mapping relationship between the newly added directory and the metadata management node in the mount table may be determined according to the following addition rule: first, the position behind the last mapping relation of the current latest mount table of the distributed storage system is determined as the record position. Second, any one position in the current latest version of the mount table of the distributed storage system is determined as the record position.
In the present embodiment, the first group metadata management node updates the mount table in itself based on the update information, simultaneously with or after determining the update information. The update process of the mount table may include the following three processes:
the update information includes a mapping relationship between the directory and the metadata management node and a corresponding relationship between the directory and the update location information. And inquiring the mounting table of the current latest version to determine the recording position corresponding to the updated position information, and deleting the mapping relation which is the same as the mapping relation between the deleted directory and the metadata management node in the recording position.
And secondly, the updating request comprises the mapping relation between the modification catalog and the metadata management node and the corresponding relation between the modification catalog and the updating position information. And inquiring the mount table of the current latest version to determine the record position corresponding to the updated position information, and modifying the mapping relation on the record position into the mapping relation between the modified directory and the metadata management node.
And thirdly, if the updated information comprises the mapping relation between the newly added catalog and the metadata management node and the corresponding relation between the newly added catalog and the metadata management node and the updated position information, inquiring the current mounting table of the latest version to determine the recording position corresponding to the updated position information, and adding the mapping relation between the newly added catalog and the metadata management node to the recording position.
It should be noted that an update log needs to be generated when an update operation is performed, so as to know which operations are performed on the mount table according to the log.
It should be noted that a set of metadata management nodes may exist in two forms: first, there is only one node in a set of metadata management nodes; second, a set of metadata management nodes exists with a primary node and at least one backup node. The main node is a node which mainly executes operation work in the metadata management nodes, and the standby node is a node which is responsible for sharing the work of the main node when the load of the main node is insufficient or the processing operation cannot be executed in time. Because the main node and the standby node need to execute work at a certain moment, mounting tables exist in the main node and the standby node. The redundant child nodes exist in the metadata management node, so that when the main node is abnormal or damaged or has a large load, the standby node can be used for processing transactions, the metadata management node of the type has a good disaster recovery effect, and the continuous operation of the metadata management node can be ensured.
Specifically, when the first group of metadata management nodes is only one node, the node is the master node of the group, and the mounted update information is received directly through the only master node. And the method for receiving the update information and the method for updating the mount table based on the update information are the same as the above-mentioned methods, and therefore will not be described herein again.
Specifically, when the first set of metadata management nodes includes a main node and at least one standby node, the receiving, by the first set of metadata management nodes, the update information of the mount table in step 101 in the flowchart shown in fig. 1 may include: receiving, by a master node of the first set of metadata management nodes, the update information of the mount table; synchronizing, by the primary node of the first set of metadata management nodes, the update information to a backup node of the first set of metadata management nodes. Because the master node and the standby node need to execute work at a certain moment, when the master node receives the update information of the mounting table, the update information needs to be synchronized to the standby node, so that the mounting table in the standby node and the mounting table in the master node can be updated synchronously. Specifically, the method for the master node to receive the update information of the mount table and the method for updating the mount table based on the update information are the same as the above-mentioned methods, and therefore, the details will not be described here. Specifically, the process of synchronizing the update information to the standby node of the first group of metadata management nodes by the master node of the first group of metadata management nodes at least includes the following two processes: first, the mount table updated in the primary node is synchronized directly to the standby node. Second, only update information is synchronized to the standby node, and then the mount table is updated in the standby node based on the update information. The method for updating the mount table based on the update information by the standby node is the same as the method described above, and therefore, the details will not be described here.
In an embodiment of the present invention, the step 102 of the flowchart shown in fig. 1 for synchronizing the update information of the mount table to the remaining N-1 sets of metadata management nodes by using the first set of metadata management nodes may include at least the following two cases:
first, when the N-1 group metadata management node is only one node, the first group metadata management node is used for synchronizing the updating information of the mount table to the rest N-1 group metadata management nodes.
Secondly, when the N-1 group metadata management nodes comprise a main node and a standby node, the main node of the first group metadata management node is used for synchronizing the updating information to the main nodes of the other N-1 group metadata management nodes; and synchronizing the updating information to respective standby nodes of the N-1 group metadata management nodes through respective main nodes of the N-1 group metadata management nodes.
Specifically, the process of synchronizing the update information to the respective standby nodes of the N-1 group metadata management nodes through the respective master nodes of the N-1 group metadata management nodes may include:
firstly, synchronizing the updating information to the main nodes of the rest N-1 groups of metadata management nodes by using the main node of the first group of metadata management nodes; and synchronizing the updating information to respective standby nodes of the N-1 group metadata management nodes through respective main nodes of the N-1 group metadata management nodes.
Secondly, determining the sequence of the rest N-1 group of metadata management nodes; synchronizing the update information to the master node of the metadata management node ordered at the first place by using the master node of the first group of metadata management nodes; synchronizing the update information to a master node ordering metadata management nodes positioned next by using a master node ordering metadata management nodes positioned next on the basis of the update ordering; and synchronizing the updating information to respective standby nodes of the N-1 group metadata management nodes through respective main nodes of the N-1 group metadata management nodes.
Specifically, the method for determining the rank of the N-1 group metadata management node may include, but is not limited to: firstly, sequencing according to the existing serial numbers of the N-1 group metadata management nodes. And secondly, sequencing according to the importance degree of the N-1 group of metadata management nodes.
It should be noted that, since the update information of the metadata management node of each group is synchronized by the source data management node whose ordering is located at the upper position, the data interaction amount between the groups of metadata management nodes is small.
In one embodiment of the invention, the method further comprises: acquiring identification information of a mount table before updating; determining updated mounting table identification information based on the update information of the mounting table; the identification information includes a version number, and/or a universally unique identification code.
Specifically, examples are as follows: the mounting table identification information of the mounting table before updating is: 0001, the mounting table identification information of the mounting table after updating is 0002. The version number mounting table identification information maintenance rule needs to be notified to the client, so that the client can correctly identify the latest mounting table according to the mounting table identification information maintenance rule.
In an embodiment of the present invention, in order to ensure that updated mount tables exist in metadata management nodes of each group in the distributed storage system, and ensure consistency of the metadata management nodes of each group, the method may further include the following steps:
checking whether the latest mount tables in each group of metadata management nodes are all updated mount tables; and if so, determining that the updating of the mounting table is completed.
In this embodiment, the method for updating the mount table may include, but is not limited to, the following two methods: first, an existing mount table is deleted, and the mount table of the latest version is directly stored in the metadata management node. And secondly, generating mounting table identification information for the new mounting table and storing the new mounting table in the metadata management node. The generated mounting table identification information has uniqueness. In the second process, the previous old version mounting table is reserved, and subsequent searching and comparison are facilitated.
In this embodiment, it is checked whether the latest mount tables in each group of metadata management nodes are all updated mount tables, and it is determined that the updated mount tables are completed synchronously only when the latest mount tables in each group of metadata management nodes are all updated mount tables. And if not, continuously updating the updated mounting table into the metadata management nodes without the updated mounting table until all the metadata management nodes have the updated mounting table. Therefore, the consistency of the latest mounting table in each group of metadata management nodes is ensured.
In one embodiment of the invention, the method further comprises: monitoring whether a distributed storage system has a newly added M group metadata management node or not by using the first group metadata management node; if yes, the first group metadata management node is used for synchronizing the updating information of the mounting table to the M groups of metadata management nodes.
In this embodiment, the distributed storage system may have a newly added metadata management node when a service is required, and therefore, in order to ensure consistency of mount tables in the distributed storage system, it is required to ensure that a latest mount table exists in the newly added metadata management node, so that a client may access data in the newly added metadata management node based on the mount table. Therefore, the first group of metadata management nodes are needed to monitor whether a new M group of metadata management nodes exist in the distributed storage system, so as to timely and synchronously update the mount table in the new M group of metadata management nodes.
Specifically, in order to enable the client to access the updated mount table from the newly added M-component data management node, the address information of the M-component data management node also needs to be maintained. The maintenance method is the same as the maintenance method of the address information of the N groups of metadata management nodes.
In an embodiment of the present invention, step 103 in the flowchart shown in fig. 1 may include: and maintaining the address information of the N groups of metadata management nodes for the client to access the updated mount table.
Specifically, the address information of the N sets of metadata management nodes is uploaded to a preset address storage location, so that the client accesses the updated mount table from any set of metadata management nodes based on the address information of the address storage location.
Specifically, the method for uploading the address information of the N groups of metadata management nodes to the preset address storage location at least includes the following two methods:
first, the address information of the N groups of metadata management nodes is uploaded to an address storage position. The address information of the N groups of metadata management nodes is uploaded to the address storage position, so that the selection range of the client for selecting the target address information can be enlarged.
And secondly, uploading address information of K group metadata management nodes in the N group metadata management nodes to an address storage position, wherein K is an integer greater than or equal to 1. Since only part of the addresses of the metadata management nodes are uploaded to the address storage location, the amount of uploaded data is small, and the uploading speed can be increased.
In this embodiment, the address storage location may be determined according to the service requirement. Optionally, the address storage location is a server accessible by the client, or a management service platform such as nuwa and fuxi accessible by the client.
In one embodiment of the invention, the method further comprises: if an access request of the client is received, verifying mounting table identification information carried by the access request; if the verification fails, the client is informed to update the mounting table; otherwise, the client is informed to access the distributed storage system.
In this embodiment, the mount table identification information carried by the access request is identification information of a latest mount table already existing in the client, and a specific type of the mount table identification information may be determined according to a service requirement. Optionally, the mount table identification information may include, but is not limited to, a version number of the mount table, and/or a UUID (Universally unique identifier), a name. Similarly, the mounting table identification information of the updated mounting table may also include, but is not limited to, a version number of the mounting table, and/or a UUID (Universally Unique Identifier), a name.
In this embodiment, the process of checking the mount table identification information carried by the access request at least includes the following steps: firstly, verifying whether the format of the mounting table identification information is correct or complete, and if the format is correct or complete, determining that the verification is not passed; otherwise, the check is determined to be passed. Secondly, checking whether mounting table identification information carried by the access request is consistent with mounting table identification information of the mounting table after updating; if not, determining that the verification fails; otherwise, the check is determined to be passed.
Specifically, for the second method, when the mount table identification information carried in the check access request is inconsistent with the mount table identification information of the updated mount table, it is indicated that the latest mount table in the client is not the latest mount table, and the client is required to synchronize the mount table of the new version in the distributed storage system to the client. At this time, the client is notified to update the mount table, and the notification may be in a manner of sending an update notification to the client to notify the client that the client needs to update the mount table. The specific type of the update notification needs to be well defined with the client, so that the client can recognize the update notification when receiving the update notification, and can perform corresponding mount table update operation according to the update notification. Alternatively, the update notification may include, but is not limited to, a set character or string of characters. When the mounting table identification information carried by the verification access request is consistent with the mounting table identification information of the updated mounting table, it is indicated that the latest mounting table in the client is the latest mounting table, at this time, the client can access the content which needs to be accessed in the distributed storage system according to the existing mounting table, and the probability of access errors during access is low. And at the moment, the client is notified to access the distributed storage system, and the notification can be realized by sending an access notification to the client so as to notify the client to perform an access operation on the distributed storage system by using the existing latest mount table. The specific type of the access notification can be determined according to the service requirement, as long as the client can recognize the access notification when receiving the access notification and perform the access operation of the corresponding distributed storage system. Alternatively, the access notification may include, but is not limited to, a set character or string of characters.
It should be noted that, the client is notified to update the mount table only when the mount table identification information of the latest mount table in the client is inconsistent with the mount table identification information of the updated mount table, so that unnecessary update operations of the client can be reduced.
In one embodiment of the invention, the method further comprises: if any group metadata management node receives the access of a client, detecting whether a main node of any group metadata management node can provide the updated mount table for the access of the client currently; and if not, providing the updated mounting table for the client to access by using the standby node of any group of metadata management nodes.
Specifically, when the client needs to update the mount table, the client accesses any group of metadata management nodes to obtain the updated mount table based on the address information of the N groups of metadata management nodes.
Specifically, the method for detecting whether the master node of the accessed metadata management node can currently provide the updated mount table for the client to access includes: judging whether the current load of the main node of the accessed metadata management node reaches a preset load threshold value or not; when the current load of the main node reaches the preset load threshold value, the load of the main node is large, if the updated mount table provided by the main node is used for the client to access, the load of the main node is further increased, the operation of the main node may be influenced to a certain extent, and the main node is seriously damaged. Therefore, in order to reduce the working pressure of the main node, when the current load of the main node reaches a preset load threshold, the standby node needs to be used for providing an updated mounting table for the client to access. And when the current load of the main node is judged not to reach the preset load threshold value, indicating that the load of the main node is normal, providing an updated mounting table for the client to access by using the main node.
In this embodiment, the process of providing the updated mount table for the client to access by using the standby node may include at least the following two processes: firstly, a target standby child node is randomly selected from the standby nodes to provide an updated mounting table for a client to access. And secondly, selecting the standby node with the minimum current load from the standby nodes to provide an updated mounting table for the client to access.
It should be noted that, before providing the updated mount table for the client to access by using the metadata management node, the method may further include the following steps:
verifying whether the client is legal; if the mount table is legal, providing the updated mount table for the client to access by using the metadata management node; otherwise, alarming.
In this embodiment, the process of verifying whether the client is legal may include, but is not limited to: verifying whether the identification of the client and the verification code of the client are legal or not; and if so, verifying that the client is legal. The client is verified, so that the probability of maliciously acquiring the new version mounting table is reduced, and the safety is improved.
In this embodiment, the specific type of alarm may be determined according to the service requirement. The alert may include, but is not limited to, writing the client into a blacklist.
Based on the description in the above embodiments, the embodiments of the above methods can be freely combined into a new embodiment according to business needs. The following describes management of a distributed storage system by taking the flowchart shown in fig. 2A as an example, and the method includes:
201. acquiring an update request carrying a mapping relation to be updated through a main node of a first group of metadata management nodes; the mounting table is used for providing a mapping relation corresponding to the N groups of metadata management nodes; wherein the N sets of metadata management nodes comprise the first set of metadata management nodes.
202. And inquiring the current latest mounting table of the distributed storage system, and determining the updating position information corresponding to the mapping relation to be updated.
203. And obtaining the updating information based on the updating position information and the mapping relation to be updated.
204. Synchronizing, by the primary node of the first set of metadata management nodes, the update information to a backup node of the first set of metadata management nodes.
205. And synchronizing the updating information to the main nodes of the rest N-1 groups of metadata management nodes by using the main node of the first group of metadata management nodes.
206. And determining the sequencing of the rest N-1 group of metadata management nodes.
207. And synchronizing the update information to the master node of the metadata management node in the first order by using the master node of the first group of metadata management nodes.
208. And based on the updating sequence, synchronizing the updating information to the main node of the metadata management node in the next sequence by using the main node of the metadata management node in the previous sequence.
209. Monitoring whether a newly added M metadata management node exists in the distributed storage system by using the first metadata management node group, and if so, executing 211; otherwise, 210 is performed.
210. Uploading the address information of the N groups of metadata management nodes to a preset address storage position, so that the client accesses the updated mount table based on the address information of the address storage position.
211. And synchronizing the updating information of the mounting table to the M groups of metadata management nodes by utilizing the first group of metadata management nodes.
212. Uploading the address information of the N + M group of metadata management nodes to a preset address storage position, so that the client accesses the updated mounting table based on the address information of the address storage position.
Further, based on the above embodiments of fig. 1 and fig. 2A, the method may further include the steps as shown in fig. 2B:
213. if an access request of the client is received, checking whether mounting table identification information carried by the access request is consistent with mounting table identification information of the mounting table after updating; if not, go to 214; otherwise, 215 is performed.
214. And determining that the verification is not passed, informing the client to update the mount table, and executing 216.
215. And determining that the verification is passed, informing the client to access the distributed storage system, and ending the current process.
216. If any group metadata management node receives the access of a client, detecting whether a main node of any group metadata management node can provide an updated mount table for the access of the client currently; if not, executing 217; otherwise, 218 is performed.
217. And providing the updated mount table for the client to access by using the standby node of any group of metadata management nodes.
218. And providing the updated mounting table for the client to access by using the main node of any group of metadata management nodes.
As shown in fig. 3, an embodiment of the present invention provides a management method for a distributed storage system, where the method is applied as a client, and the method includes:
301. and accessing the updated mount table in any group of metadata management nodes based on the address information of the N group of metadata management nodes of the distributed storage system.
302. And executing access operation on the distributed storage system based on the accessed updated mounting table.
According to the embodiment shown in fig. 3, in the embodiment of the present invention, since the client directly accesses the updated mount table in the metadata management node according to the address information of the metadata management node, the scheme provided by the embodiment of the present invention can improve the consistency between the mount table used by the client and the mount table in the distributed storage system.
In an embodiment of the present invention, the step 301 in the flowchart shown in fig. 3 above, accessing an updated mount table in any group of metadata management nodes based on address information of the N group of metadata management nodes in the distributed storage system, may include: accessing a main node of any group of metadata management nodes, and if the main node accepts access, accessing the updated mount table in the main node; and if the master node refuses the access, accessing the updated mount table in the standby node of any group of metadata management nodes.
In this embodiment, the address storage location is accessed according to a preset password, and the address information selected in the address storage location can be read only if the password is correct. Because the address information is selected according to the password, the address storage position can be prevented from being accessed by a malicious party, and the probability that the address information stored in the address storage position is acquired by the malicious party is reduced.
In this embodiment, the selection rule for selecting address information from the address information of the N groups of metadata management nodes may include, but is not limited to, the following three types: first, one address information is randomly selected from the address information of the N sets of metadata management nodes. Second, address information ordered at the first bit is selected from the address information of the N-group metadata management nodes. And thirdly, respectively determining the times of selecting each address information in the set duration, wherein the address information with the most or least selecting times or in the middle is selected. If the number of the addresses of the metadata management node with the largest or the smallest number of times or the middle number is multiple, one address information is randomly selected from the multiple address information. The address information meeting the requirements can be selected through the selection rule.
It should be noted that, before accessing the updated mount table in any group of metadata management nodes based on the address information of the N group of metadata management nodes of the distributed storage system, the method may further include: sending an access request to the distributed storage system; the access request carries identification information of the current latest version mounting table of the client; if receiving the update notification, executing the address information of the N groups of metadata management nodes based on the distributed storage system, and accessing an updated mount table in any group of metadata management nodes; the updating notification is fed back when the distributed system checks that the identification information carried by the access request fails; if an access notification is received, accessing the distributed storage system based on the current latest version mounting table; and the access notification is fed back when the distributed system checks the identification information carried by the access request.
Specifically, the purpose of sending the access request to the distributed storage system is to verify whether the existing latest mount table of the client is consistent with the updated mount table in the distributed storage system, so as to avoid the situation that the client accesses the distributed storage system by using an old mount table, thereby reducing the probability that the client cannot access data or access data which does not meet the access requirement.
Specifically, an access request is sent to the distributed storage system, the access request carries identification information of a mount table of a current latest version of a client, so that the distributed storage system judges whether the identification information of the mount table of the current latest version is consistent with the identification information of an updated mount table in the distributed storage system, and sends an update notification to the client when the identification information of the mount table of the current latest version is inconsistent with the identification information of the mount table of the updated mount table in the distributed storage system.
In addition, before sending the access request to the distributed storage system, the method further comprises: and if the access request is successfully loaded into the current latest version mounting table, generating the access request by using the identification information of the current latest version mounting table.
Specifically, when the presence of the mount table in the client is detected, the mount table of the current latest version already present in the client is loaded. If the current latest mount table is loaded in the set duration, the current latest mount table is available, and an access request is generated by using the identification information of the current latest mount table, so that the distributed storage system can verify whether the current latest mount table in the client is an updated mount table in the distributed storage system.
Specifically, when it is detected that the mount table does not exist in the client, it is indicated that the client does not have a basis for accessing the distributed storage system, that is, the client cannot perform an access operation on the distributed storage system. At this time, it is necessary to read the updated mount table in any group of metadata management nodes according to the address information of the N group of metadata management nodes stored in the address storage location to obtain the mount table, and perform an access operation on the distributed storage system according to the obtained mount table.
Specifically, when it is detected that the mount table exists in the client, but the mount table is not successfully loaded to the existing mount table of the latest version within the set time period, it is indicated that the mount table of the latest version is abnormal, and the probability of availability of the mount table of the latest version is low. At this time, in order to perform an access operation on the distributed storage system by the client, the updated mount table in any group of metadata management nodes needs to be read according to the address information of the N group of metadata management nodes stored in the address storage location to obtain the mount table, and the access operation is performed on the distributed storage system according to the obtained mount table.
In an embodiment of the present invention, before performing an access operation on the distributed storage system based on the accessed updated mount table in step 302 of the flowchart shown in fig. 3, the method further includes at least the following three procedures:
first, the current latest version of the mount table existing in the client is deleted, and then the mount table accessed is directly stored in a specified position.
In the process, only the latest mounting table version exists at the appointed position of the client, so that the mounting table can be accurately loaded and the latest mounting table can be quickly loaded.
Secondly, generating new identification information for the accessed updated mounting table, and storing the updated mounting table in a specified position; wherein the generated new identification information has uniqueness.
When the obtained mount table is stored in the designated position in the process, the mount table which exists before is also stored in the designated position. The identification information can be used to distinguish between the old and new of the mounting table. Because the mounting tables of the new version and the old version are stored, when the mounting table of the latest version is abnormal, the mounting table of the next new version can be used for executing corresponding access operation or sending an access request. In addition, when the mounting tables of the new version and the old version are stored, the updating content of the mounting table of the new version and the old version can be known in time according to the difference of the new version and the old version.
Thirdly, writing the accessed updated mounting table into a setting file with a first file name; deleting the existing latest mount table in the client, and keeping a second file name corresponding to the existing latest mount table; establishing a hard link between the first file name and the second file name; and deleting the first file name, and storing the new version mount table with the second file name.
Specifically, the setting file may be stored in advance in a designated location, or may be generated when access to the updated mount table is started. The file format of the setting file can be determined according to the service requirement. Optionally, the setting file is a TXT file or an XML file. The designated location may be determined based on the service requirements. Optionally, the specified location is located in the storage hardware of the client.
Specifically, examples are as follows: the client already has the latest mount table "file B", and the file name of file B is "B". And writing the updated mounting table into a setting file 'file A', wherein the file name of the file A is 'A'. Then, the file B is deleted, and the file name of the file B is reserved as "B". Establishing a hard link between the file name 'A' and the file name 'B', deleting the file name 'A', obtaining the file A with the file name 'B', and finishing the update of the mount table.
When the obtained updated mount table is updated to the designated location, the mount table is updated in a hard link manner, so that the probability that the new mount table updated to the designated location is deleted by mistake is reduced.
Based on the description in the above embodiments, the embodiments of the above methods can be freely combined into a new embodiment according to business needs. The following describes a mount table updating method by taking the flowchart shown in fig. 4 as an example, where the method includes:
401. detecting whether the client has a mounting table or not; if so, 402 is performed.
402. And loading the current latest version of mounting table in the client within a set time length, and if the loading is successful, generating the access request by using the mounting table identification information of the current latest version of mounting table.
403. Sending an access request to the distributed storage system; the access request carries the mount table identification information of the mount table of the client of the current latest version, and is executed 404 and 408.
404. If receiving the update notification, executing the address information of the N groups of metadata management nodes based on the distributed storage system, and accessing an updated mount table in any group of metadata management nodes; the update notification is that the distributed system checks that the identification information carried by the access request is not passed through the time feedback, and 405 and 406 are executed.
405. And accessing the main node of any group of metadata management nodes, and if the main node accepts the access, accessing the updated mount table in the main node and executing 407.
406. And if the master node refuses the access, accessing the updated mount table in the standby node of any group of metadata management nodes.
407. And updating the accessed updated mounting table to a specified position, and ending the current flow.
408. If an access notification is received, accessing the distributed storage system based on the current latest version mounting table; and the access notification is fed back when the distributed system checks the identification information carried by the access request.
As shown in fig. 5, an embodiment of the present invention provides a management apparatus for a distributed storage system, where the apparatus is applied to the distributed storage system, and includes:
a receiving unit 501, configured to receive, by a first group of metadata management nodes, update information of a mount table, where the mount table is used to provide a mapping relationship corresponding to N group of metadata management nodes; wherein the N groups of metadata management nodes comprise the first group of metadata management nodes;
a synchronization unit 502, configured to synchronize the update information of the mount table to the remaining N-1 sets of metadata management nodes by using the first set of metadata management nodes;
a providing unit 503, configured to provide access for the client based on the updated mount table.
According to the embodiment shown in fig. 5, in the embodiment of the present invention, the mount table used by the client and the mount table in the distributed storage system are synchronized without human intervention, and the mount table is not maintained by means of an external service during synchronization, and is accessed by the client based on the updated mount table. Therefore, the scheme provided by the embodiment of the invention can improve the consistency of the mounting table used by the client and the mounting table in the distributed storage system.
Further, as shown in fig. 6, the apparatus further includes:
the synchronizing unit 502 is further configured to synchronize the update information of the mount table to the M group metadata management nodes by using the first group metadata management node if the first group metadata management node monitors that there is a newly added M group metadata management node in the distributed storage system.
Further, as shown in fig. 6, the receiving unit 501 includes:
a receiving module 5011, configured to receive, by a master node of the first set of metadata management nodes, the update information of the mount table;
a first synchronization module 5012, configured to synchronize the update information to a standby node of the first set of metadata management nodes through a master node of the first set of metadata management nodes.
Further, as shown in fig. 6, the synchronization unit 502 includes:
a second synchronization module 5021, configured to synchronize the update information with the master node of the first group of metadata management nodes to the master nodes of the remaining N-1 groups of metadata management nodes;
a third synchronizing module 5022, configured to synchronize the update information with the respective backup nodes of the N-1 group metadata management nodes through the respective master nodes of the N-1 group metadata management nodes.
Further, as shown in fig. 6, the synchronization unit 502 includes:
the fourth synchronization module 5023 is configured to determine the ranks of the remaining N-1 sets of metadata management nodes; synchronizing the update information to the master node of the metadata management node ordered at the first place by using the master node of the first group of metadata management nodes; synchronizing the update information to a master node ordering metadata management nodes positioned next by using a master node ordering metadata management nodes positioned next on the basis of the update ordering; and synchronizing the updating information to respective standby nodes of the N-1 group metadata management nodes through respective main nodes of the N-1 group metadata management nodes.
Further, as shown in fig. 6, the apparatus further includes:
a first detecting unit 505, configured to detect, if any group of metadata management nodes receives an access from a client, whether a master node of any group of metadata management nodes can currently provide the updated mount table for the access from the client; if not, the providing unit 506 is triggered;
the providing unit 506 is configured to provide the updated mount table for the client to access by using a standby node of any group of metadata management nodes under the trigger of the first detecting unit 505.
Further, as shown in fig. 6, the apparatus further includes:
an obtaining unit 507, configured to obtain identification information of the mount table before updating;
a determining unit 508, configured to determine updated mount table identification information based on the update information of the mount table; the identification information includes a version number, and/or a universally unique identification code.
Further, as shown in fig. 6, the receiving unit 501 includes:
an obtaining module 5013, configured to obtain, by a first group of metadata management nodes, an update request carrying a mapping relationship to be updated;
the query module 5014 is configured to query a current latest mount table of the distributed storage system, and determine update location information corresponding to the mapping relationship to be updated;
the processing module 5015 is configured to obtain the update information based on the update location information and the mapping relationship to be updated.
Further, as shown in fig. 6, the providing unit 503 is configured to maintain address information of the N groups of metadata management nodes for a client to access the updated mount table.
Further, as shown in fig. 6, the providing unit 503 is configured to upload address information of the N groups of metadata management nodes to a preset address storage location, so that the client accesses the updated mount table from any group of metadata management nodes based on the address information of the address storage location.
Further, as shown in fig. 6, the apparatus further includes:
a checking unit 509, configured to, if an access request of the client is received, check mount table identification information carried in the access request; if the verification fails, the triggering notification unit 510 notifies the client to update the mount table; otherwise, the trigger notification unit 510 notifies the client to access the distributed storage system.
Further, as shown in fig. 6, the checking unit 509 is configured to check whether mounting table identification information carried in the access request is consistent with mounting table identification information of the updated mounting table; if not, determining that the verification fails; otherwise, the check is determined to be passed.
The information interaction, the execution process and other contents between the modules in the device are based on the same concept as the embodiment of the management method of the distributed storage system applied to the distributed storage system of the present invention, and specific contents can be referred to the description in the embodiment of the method of the present invention, and are not described herein again. Based on the description in the above embodiments, the embodiments of the apparatus can be freely combined into a new embodiment according to business needs.
As shown in fig. 7, an embodiment of the present invention provides a management apparatus for a distributed storage system, which is applied to a client, and includes:
a first accessing unit 601, configured to access an updated mount table in any group of metadata management nodes based on address information of N group of metadata management nodes of the distributed storage system;
an operation unit 602, configured to perform an access operation on the distributed storage system based on the accessed updated mount table.
According to the embodiment shown in fig. 7, the mount table used by the client and the mount table in the distributed storage system are synchronized without manual intervention, and the mount table is not maintained by means of external services during synchronization, so that the client can access the updated mount table based on the address information of the maintained N groups of metadata management nodes. Therefore, the scheme provided by the embodiment of the invention can improve the consistency between the mounting table used by the client and the mounting table in the distributed storage system
Further, as shown in fig. 8, the first accessing unit 601 is configured to access a master node of any group of metadata management nodes, and if the master node accepts access, access the updated mount table in the master node; and if the master node refuses the access, accessing the updated mount table in the standby node of any group of metadata management nodes.
Further, as shown in fig. 8, the apparatus further includes:
a sending unit 603, configured to send an access request to the distributed storage system; the access request carries identification information of the current latest version mounting table of the client;
a first accessing unit 601, configured to execute the address information of the N groups of metadata management nodes based on the distributed storage system if an update notification is received, and access an updated mount table in any group of metadata management nodes; the updating notification is fed back when the distributed system checks that the identification information carried by the access request fails;
a second accessing unit 604, configured to access the distributed storage system based on the current latest mount table if an access notification is received; and the access notification is fed back when the distributed system checks the identification information carried by the access request.
Further, as shown in fig. 8, the apparatus further includes:
a second detecting unit 605, configured to detect whether the mount table exists in the client; if yes, triggering the generation unit 606;
the generating unit 606 is configured to, under the trigger of the second detecting unit 605, if the current latest mount table is successfully loaded, generate the access request by using the identification information of the current latest mount table.
Further, as shown in fig. 8, the apparatus further includes: an updating unit 607, configured to write the accessed updated mount table into a setting file with a first file name; deleting the existing latest mount table in the client, and keeping a second file name corresponding to the existing latest mount table; establishing a hard link between the first file name and the second file name; and deleting the first file name, and storing the new version mount table with the second file name.
The information interaction, execution process and other contents between the modules in the device are based on the same concept as the management method embodiment of the distributed storage system applied to the client, and specific contents can be referred to the description in the method embodiment of the present invention, and are not described herein again. Based on the description in the above embodiments, the embodiments of the apparatus can be freely combined into a new embodiment according to business needs.
As shown in fig. 9, an embodiment of the present invention provides a distributed storage system, including:
the system comprises N groups of metadata management nodes 901, wherein a first group of metadata management nodes 9011 is configured to receive update information of a mount table, and synchronize the update information of the mount table to the remaining N-1 groups of metadata management nodes 9012; the mounting table is used for providing a mapping relation corresponding to the N groups of metadata management nodes 9012;
the client 902 is configured to access the updated mount table.
Further, as shown in fig. 10, the first group metadata management node 9011 is further configured to synchronize the update information of the mount table to the M group metadata management nodes if it is monitored that there is a new M group metadata management node in the distributed storage system.
Further, as shown in fig. 10, the first set of metadata management nodes 9011 includes: a master node 90111 and a standby node 90112;
the master node 90111 is configured to receive the update information of the mount table, and synchronize the update information to the standby node 90112;
the standby node 90112 is configured to receive the update information synchronized by the main node 90111.
Further, as shown in fig. 10, the master node 90111 of the first metadata management node 9011 is configured to synchronize the update information to the master nodes 90121 of the remaining N-1 metadata management nodes 9012;
and the respective master node 90121 of the N-1 element data management node 9012 is configured to synchronize the update information to the respective standby node 90122 of the N-1 element data management node 90121.
Because the information interaction, execution process, and other contents between the modules in the system are based on the same concept as the management method embodiment of the distributed storage system in the embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again. Based on the description in the above embodiments, the embodiments of the apparatus can be freely combined into a new embodiment according to business needs.
An embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, where, when the program runs, a device in which the storage medium is located is controlled to execute any one of the foregoing management methods applied to a distributed storage system of the distributed storage system, or execute any one of the foregoing management methods applied to a distributed storage system of a client.
An embodiment of the present invention provides a storage management device, including: a memory for storing a program; a processor, coupled to the memory, for executing the program to perform any one of the above management methods applied to the distributed storage system of the distributed storage system, or to perform any one of the above management methods applied to the distributed storage system of the client.
Because the content of information interaction, execution process, and the like among the modules in the device is based on the same concept as the method embodiment of the present invention, specific content can be referred to the description in the method embodiment of the present invention, and is not described herein again. Based on the description in the above embodiments, the embodiments of the apparatus can be freely combined into a new embodiment according to business needs.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
The distributed storage system has the characteristics of large capacity, strong data consistency, super-strong expansion capability and the like, so that the application is more and more extensive.

Claims (25)

1. A method for managing a distributed storage system, the method comprising:
receiving update information of a mount table through a first group of metadata management nodes, wherein the mount table is used for providing a mapping relation corresponding to the N group of metadata management nodes; wherein the N groups of metadata management nodes comprise the first group of metadata management nodes;
synchronizing the update information of the mount table to the rest N-1 groups of metadata management nodes by using the first group of metadata management nodes;
and accessing the client based on the updated mounting table.
2. The method of claim 1, further comprising:
and if the first group of metadata management nodes monitor that the distributed storage system has M newly added metadata management nodes, synchronizing the updating information of the mount table to the M group of metadata management nodes by using the first group of metadata management nodes.
3. The method according to claim 1, wherein said receiving, by the first group metadata management node, update information of the mount table comprises:
receiving, by a master node of the first set of metadata management nodes, the update information of the mount table;
synchronizing, by the primary node of the first set of metadata management nodes, the update information to a backup node of the first set of metadata management nodes.
4. The method of claim 1, wherein the synchronizing the update information of the mount table with the first set of metadata management nodes to the remaining N-1 sets of metadata management nodes comprises:
synchronizing the update information to the main nodes of the rest N-1 metadata management nodes by using the main node of the first metadata management node;
and synchronizing the updating information to respective standby nodes of the N-1 group metadata management nodes through respective main nodes of the N-1 group metadata management nodes.
5. The method of claim 4, wherein the synchronizing the update information of the mount table with the first set of metadata management nodes to the remaining N-1 sets of metadata management nodes comprises:
determining the sequencing of the rest N-1 group of metadata management nodes;
synchronizing the update information to the master node of the metadata management node ordered at the first place by using the master node of the first group of metadata management nodes;
synchronizing the update information to a master node ordering metadata management nodes positioned next by using a master node ordering metadata management nodes positioned next on the basis of the update ordering;
and synchronizing the updating information to respective standby nodes of the N-1 group metadata management nodes through respective main nodes of the N-1 group metadata management nodes.
6. The method according to any one of claims 1-5, further comprising:
if any group metadata management node receives the access of a client, detecting whether a main node of any group metadata management node can provide the updated mount table for the access of the client currently;
and if not, providing the updated mounting table for the client to access by using the standby node of any group of metadata management nodes.
7. The method according to any one of claims 1-5, further comprising:
acquiring identification information of a mount table before updating;
determining updated mounting table identification information based on the update information of the mounting table; the identification information includes a version number, and/or a universally unique identification code.
8. The method according to any of claims 1-5, wherein said receiving, by the first group of metadata management nodes, the update information of the mount table comprises:
acquiring an updating request carrying a mapping relation to be updated through a first group of metadata management nodes;
inquiring a current latest mounting table of the distributed storage system, and determining updating position information corresponding to the mapping relation to be updated;
and obtaining the updating information based on the updating position information and the mapping relation to be updated.
9. The method according to any of claims 1-5, wherein the updating the mount table based on the updated mount table for the client to access comprises:
and maintaining the address information of the N groups of metadata management nodes for the client to access the updated mount table.
10. The method of claim 9, wherein maintaining address information of the N groups of metadata management nodes for clients to access the updated mount table comprises:
uploading the address information of the N groups of metadata management nodes to a preset address storage position, so that the client accesses the updated mount table from any group of metadata management nodes based on the address information of the address storage position.
11. The method according to any one of claims 1-5, further comprising:
if an access request of the client is received, verifying mounting table identification information carried by the access request;
and if the verification fails, notifying the client to update the mounting table.
12. The method of claim 11, wherein the checking the mount table identification information carried by the access request comprises:
checking whether the identification information of the mounting table carried by the access request is consistent with the identification information of the mounting table after updating;
if not, determining that the verification fails; otherwise, the check is determined to be passed.
13. A management method of a distributed storage system is applied to a client, and the method comprises the following steps:
accessing an updated mount table in any group of metadata management nodes based on the address information of the N group of metadata management nodes of the distributed storage system;
and executing access operation on the distributed storage system based on the accessed updated mounting table.
14. The method of claim 13, wherein accessing the updated mount table in any group of metadata management nodes based on address information of the N group of metadata management nodes of the distributed storage system comprises:
accessing a main node of any group of metadata management nodes, and if the main node accepts access, accessing the updated mount table in the main node; and if the master node refuses the access, accessing the updated mount table in the standby node of any group of metadata management nodes.
15. The method of claim 13 or 14, further comprising:
sending an access request to the distributed storage system; the access request carries identification information of the current latest version mounting table of the client;
if receiving the update notification, executing the address information of the N groups of metadata management nodes based on the distributed storage system, and accessing an updated mount table in any group of metadata management nodes; the updating notification is fed back when the distributed system checks that the identification information carried by the access request fails;
if an access notification is received, accessing the distributed storage system based on the current latest version mounting table; and the access notification is fed back when the distributed system checks the identification information carried by the access request.
16. The method of claim 15, wherein prior to said sending an access request to the distributed storage system, the method further comprises:
detecting whether the client has a mounting table or not;
if the access request exists, if the access request is successfully loaded to the current latest version mounting table, the access request is generated by using the identification information of the current latest version mounting table.
17. The method according to claim 13 or 14, wherein before the performing an access operation on the distributed storage system based on the accessed updated mount table, the method further comprises:
writing the accessed updated mounting table into a setting file with a first file name;
deleting the existing latest mount table in the client, and keeping a second file name corresponding to the existing latest mount table;
establishing a hard link between the first file name and the second file name;
and deleting the first file name, and storing the new version mount table with the second file name.
18. An apparatus for managing a distributed storage system, the apparatus comprising:
the receiving unit is used for receiving the updating information of a mounting table through a first group of metadata management nodes, wherein the mounting table is used for providing a mapping relation corresponding to the N group of metadata management nodes; wherein the N groups of metadata management nodes comprise the first group of metadata management nodes;
the synchronization unit is used for synchronizing the updating information of the mounting table to the rest N-1 groups of metadata management nodes by utilizing the first group of metadata management nodes;
and the providing unit is used for providing access for the client based on the updated mounting table.
19. A management apparatus of a distributed storage system, applied to a client, the apparatus comprising:
the first access unit is used for accessing the updated mount table in any group of metadata management nodes based on the address information of the N group of metadata management nodes of the distributed storage system;
and the operation unit is used for executing access operation on the distributed storage system based on the accessed updated mounting table.
20. A distributed storage system, comprising:
the system comprises N groups of metadata management nodes, wherein a first group of metadata management nodes are used for receiving the updating information of a mounting table and synchronizing the updating information of the mounting table to the rest N-1 groups of metadata management nodes; the mounting table is used for providing a mapping relation corresponding to the N groups of metadata management nodes;
and the client is used for accessing the updated mounting table.
21. The system of claim 20,
the first group of metadata management nodes are further configured to synchronize the update information of the mount table to the M group of metadata management nodes if it is monitored that the distributed storage system has a newly added M group of metadata management nodes.
22. The system of claim 20, wherein the first set of metadata management nodes comprises: a master node and a standby node;
the master node is used for receiving the updating information of the mounting table and synchronizing the updating information to the standby node;
and the standby node is used for receiving the updated information synchronized by the main node.
23. The system of claim 20,
the main node of the first group of metadata management nodes is used for synchronizing the updating information to the main nodes of the other N-1 group of metadata management nodes;
and the respective main node of the N-1 group metadata management node is used for synchronizing the updating information to the respective standby node of the N-1 group metadata management node.
24. A computer-readable storage medium, characterized in that the storage medium includes a stored program, and wherein when the program runs, the apparatus on which the storage medium is located is controlled to execute the management method of the distributed storage system according to any one of claims 1 to 12, or to execute the management method of the distributed storage system according to any one of claims 13 to 17.
25. A storage management device, comprising:
a memory for storing a program;
a processor, coupled to the memory, for executing the program to perform the method for managing a distributed storage system of any one of claims 1 to 12 or the method for managing a distributed storage system of any one of claims 13 to 17.
CN201910164730.8A 2019-03-05 2019-03-05 Management method and device of distributed storage system Active CN111666035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910164730.8A CN111666035B (en) 2019-03-05 2019-03-05 Management method and device of distributed storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910164730.8A CN111666035B (en) 2019-03-05 2019-03-05 Management method and device of distributed storage system

Publications (2)

Publication Number Publication Date
CN111666035A true CN111666035A (en) 2020-09-15
CN111666035B CN111666035B (en) 2023-06-20

Family

ID=72381486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910164730.8A Active CN111666035B (en) 2019-03-05 2019-03-05 Management method and device of distributed storage system

Country Status (1)

Country Link
CN (1) CN111666035B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6081883A (en) * 1997-12-05 2000-06-27 Auspex Systems, Incorporated Processing system with dynamically allocatable buffer memory
US20090049240A1 (en) * 2007-08-17 2009-02-19 Fujitsu Limited Apparatus and method for storage management system
CN102136003A (en) * 2011-03-25 2011-07-27 上海交通大学 Large-scale distributed storage system
WO2016202199A1 (en) * 2015-06-18 2016-12-22 阿里巴巴集团控股有限公司 Distributed file system and file meta-information management method thereof
CN106302607A (en) * 2015-06-05 2017-01-04 腾讯科技(深圳)有限公司 It is applied to block storage system and the method for cloud computing
CN108595616A (en) * 2018-04-23 2018-09-28 南京大学 A kind of method of the naming space management of Based on Distributed file system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6081883A (en) * 1997-12-05 2000-06-27 Auspex Systems, Incorporated Processing system with dynamically allocatable buffer memory
US20090049240A1 (en) * 2007-08-17 2009-02-19 Fujitsu Limited Apparatus and method for storage management system
CN102136003A (en) * 2011-03-25 2011-07-27 上海交通大学 Large-scale distributed storage system
CN106302607A (en) * 2015-06-05 2017-01-04 腾讯科技(深圳)有限公司 It is applied to block storage system and the method for cloud computing
WO2016202199A1 (en) * 2015-06-18 2016-12-22 阿里巴巴集团控股有限公司 Distributed file system and file meta-information management method thereof
CN108595616A (en) * 2018-04-23 2018-09-28 南京大学 A kind of method of the naming space management of Based on Distributed file system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YINGYING WU; ZHENGHE LIANG: "Implementation of Distributed XA Transactions in MyCat Based on Table Broadcasting Mechanism" *
张栗粽;崔园;罗光春;陈爱国;卢国明;王晓雪;: "面向大数据分布式存储的动态负载均衡算法" *
那文武;柯剑;朱旭东等: "BW-netRAID:一种后端集中冗余管理的网络RAID系统" *

Also Published As

Publication number Publication date
CN111666035B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN106982236B (en) Information processing method, device and system
CN106899648B (en) Data processing method and equipment
CN106776130B (en) Log recovery method, storage device and storage node
WO2018233630A1 (en) Fault discovery
US10949401B2 (en) Data replication in site recovery environment
CN109831540B (en) Distributed storage method and device, electronic equipment and storage medium
US20220004334A1 (en) Data Storage Method, Apparatus and System, and Server, Control Node and Medium
CN110046062B (en) Distributed data processing method and system
CN108509296B (en) Method and system for processing equipment fault
CN110597764A (en) File management method and device
CN110858168A (en) Cluster node fault processing method and device and cluster node
CN115087966A (en) Data recovery method, device, equipment, medium and program product
CN111625396B (en) Backup data verification method, server and storage medium
CN110928945B (en) Data processing method and device for database and data processing system
CN112000850A (en) Method, device, system and equipment for data processing
CN111666035B (en) Management method and device of distributed storage system
CN108228613B (en) Data reading method and device
CN115495432A (en) Method, device and equipment for supporting multiple instances
CN112860746B (en) Cache reduction-based method, equipment and system
CN111209138A (en) Operation and maintenance method and device of data storage system
CN111147226A (en) Data storage method, device and storage medium
CN113656496A (en) Data processing method and system
CN114490196A (en) Database switching method, system, device and medium
US11108730B2 (en) Group heartbeat information in a domain name system server text record
CN110968888B (en) Data processing 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40036449

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant