[go: up one dir, main page]

CN108156203B - Storage system and storage node management method - Google Patents

Storage system and storage node management method Download PDF

Info

Publication number
CN108156203B
CN108156203B CN201611109234.5A CN201611109234A CN108156203B CN 108156203 B CN108156203 B CN 108156203B CN 201611109234 A CN201611109234 A CN 201611109234A CN 108156203 B CN108156203 B CN 108156203B
Authority
CN
China
Prior art keywords
information
storage node
node
storage
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611109234.5A
Other languages
Chinese (zh)
Other versions
CN108156203A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201611109234.5A priority Critical patent/CN108156203B/en
Publication of CN108156203A publication Critical patent/CN108156203A/en
Application granted granted Critical
Publication of CN108156203B publication Critical patent/CN108156203B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2329Optimistic concurrency control using versioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例公开了一种存储系统及存储节点管理方法,系统包括至少两台存储节点:角色信息为管理者的第一存储节点、及角色信息不为管理者的第二存储节点;每台存储节点中运行管理服务;第二存储节点检测到第一存储节点出现故障后,通过各存储节点中运行的管理服务下的选举机制,判断自身角色信息是否为管理者;如果是,判断自身是否配置有访问存储系统的地址信息,如果未配置,则获取并配置地址信息。应用本方案,在作为管理者的存储节点出现故障后,利用各存储节点中运行的管理服务下的选举机制,各存储节点都有可能成为新的管理者,新的管理者配置访问该存储系统的地址信息,该存储系统能够继续提供存储服务;因此,提高了存储系统的可靠性。

Figure 201611109234

The embodiment of the present invention discloses a storage system and a storage node management method. The system includes at least two storage nodes: a first storage node whose role information is a manager, and a second storage node whose role information is not a manager; each storage node Run the management service in the storage node; after the second storage node detects the failure of the first storage node, it judges whether its role information is a manager through the election mechanism under the management service running in each storage node; if so, judges whether it is a manager The address information for accessing the storage system is configured. If it is not configured, the address information is obtained and configured. Using this solution, after the storage node serving as the manager fails, each storage node may become a new manager by using the election mechanism under the management service running in each storage node, and the new manager is configured to access the storage system address information, the storage system can continue to provide storage services; therefore, the reliability of the storage system is improved.

Figure 201611109234

Description

Storage system and storage node management method
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a storage system and a storage node management method.
Background
An existing storage system generally includes a management node and storage nodes, where the storage nodes are physical media for storing data, and the management node manages data stored in each storage node in the system.
In some storage systems with a small amount of stored data, an independent management node is not usually provided, but one or a few storage nodes are selected as managers, and the managers manage the data stored in each storage node in the storage system.
In the above scheme, the number of managers is small, and if all the managers have faults, the storage system is broken down and cannot continue to provide storage services, that is, the reliability of the storage system is poor.
Disclosure of Invention
The embodiment of the invention aims to provide a storage system and a storage node management method, which are used for improving the reliability of the storage system.
In order to achieve the above object, an embodiment of the present invention discloses a storage system, which includes at least two storage nodes, where each storage node runs a management service; the at least two storage nodes comprise a first storage node with role information as a manager and a second storage node with role information not as the manager;
the second storage node is used for judging whether the role information of the second storage node is a manager or not through an election mechanism under management service running in each storage node after the first storage node is detected to have a fault; if yes, judging whether the self is configured with address information for accessing the storage system, and if not, acquiring and configuring the address information.
Optionally, the second storage node may be further configured to determine, through the election mechanism, whether the second storage node is a temporary administrator:
if so, initiating election, determining the role information of each storage node in the storage system according to voting information sent by each election participant, and identifying the role information of each storage node by using management services operated in each storage node so that each storage node determines the role information of the storage node according to the identification;
if not, judging whether the user is an election participant, if so, sending voting information to the temporary manager after the temporary manager initiates election.
Optionally, the second storage node may be further configured to determine whether the second storage node is configured with address information for accessing the storage system when it is determined that the own role information is not a manager, and delete the address information if the second storage node is configured.
Optionally, the second storage node may be further configured to receive, through a management service running on the second storage node, fault notification information indicating that the first storage node has a fault;
and the second storage node can also be used for judging whether the role information of the second storage node is a manager or not according to the role information identified in the management service operated by the second storage node after the election is finished.
Optionally, the second storage node may be further configured to receive data change information through a management service executed by the second storage node; and updating the database stored by the database according to the data change information.
Optionally, the database stores index information of data stored in the storage system and node information of each storage node in the storage system;
the second storage node may be further configured to update index information in the database according to index information of changed data included in the data change information; and updating the node information in the database according to the node information of the change storage node contained in the data change information.
Optionally, the database stores index information of data stored in the storage system and node information of each storage node in the storage system;
the second storage node may be further configured to read index information of the storage data of each storage node and node information of each storage node;
comparing the read index information with the index information in the database to obtain a first comparison result;
comparing the read node information with the node information in the database to obtain a second comparison result;
and updating the database according to the first comparison result and the second comparison result.
Optionally, the database further stores a first version number corresponding to each piece of index information and a second version number corresponding to each piece of node information;
the second storage node may be further configured to update, according to the first comparison result, the index information in the database and the first version number corresponding to the index information;
and updating the node information in the database and a second version number corresponding to the node information according to the second comparison result.
In order to achieve the above object, the embodiment of the present invention further discloses a storage node management method, which is applied to storage nodes in a storage system, where management services are run in each storage node of the storage system; the method comprises the following steps:
after detecting that a storage node with the role information as a manager fails, judging whether the own role information is the manager or not through an election mechanism under management service running in each storage node;
if yes, judging whether the self is configured with address information for accessing the storage system, and if not, acquiring and configuring the address information.
Optionally, after detecting that the storage node whose role information is the manager fails, the method may further include:
judging whether the election mechanism is a temporary manager or not through the election mechanism:
if so, initiating election, determining the role information of each storage node in the storage system according to the voting information sent by each election participant, and identifying the role information of each storage node by using the management service operated in each storage node;
if not, judging whether the user is an election participant, if so, sending voting information to the temporary manager after the temporary manager initiates election.
Optionally, in a case that it is determined that the own role information is not the administrator, the method further includes:
judging whether the self is configured with address information for accessing the storage system, and if so, deleting the address information.
Optionally, a management service is run in a storage node in the storage system; the step of detecting that the storage node whose role information is the manager fails may include:
receiving fault prompt information through a management service operated by the management node, wherein the fault prompt information indicates that a storage node with role information as a manager has a fault;
the step of determining whether the role information of the storage node is a manager or not through an election mechanism under the management service running in each storage node may include:
and after the election is finished, judging whether the role information of the user is a manager or not according to the role information identified in the management service operated by the user.
Optionally, the method may further include:
receiving data change information through a management service operated by the management server;
and updating the database stored by the database according to the data change information.
Optionally, the database stores index information of data stored in the storage system and node information of each storage node in the storage system;
when the data change information includes index information of changed data, the updating the database may include:
updating the index information in the database according to the index information of the changed data contained in the data change information;
in a case where the data change information includes node information of a change storage node, the updating of the database stored in the update storage node may include:
and updating the node information in the database according to the node information of the change storage node contained in the data change information.
Optionally, the database stores index information of data stored in the storage system and node information of each storage node in the storage system; the step of updating the database stored in the database comprises the following steps:
reading index information of the storage data of each storage node and node information of each storage node;
comparing the read index information with the index information in the database to obtain a first comparison result;
comparing the read node information with the node information in the database to obtain a second comparison result;
and updating the database according to the first comparison result and the second comparison result.
Optionally, the database further stores a first version number corresponding to each piece of index information and a second version number corresponding to each piece of node information, and the step of updating the database according to the first comparison result and the second comparison result may include:
updating the index information in the database and the corresponding first version number according to the first comparison result;
and updating the node information in the database and a second version number corresponding to the node information according to the second comparison result.
Therefore, by applying the embodiment of the invention, after the storage node as the manager fails, each storage node is possible to become a new manager by using an election mechanism under the management service operated in each storage node, the new manager configures the address information for accessing the storage system, and the storage system can continue to provide the storage service; therefore, the reliability of the memory system is improved.
Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
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 described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a memory system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a storage node management method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the above technical problem, an embodiment of the present invention provides a storage system and a storage node management method, where the method may be applied to a storage node in the storage system. First, a detailed description will be given of a storage system according to an embodiment of the present invention.
The storage system may be as shown in fig. 1, comprising at least two storage nodes: the storage node 1 and the storage node 2 … … may be the storage node N, or may include only the storage node 1 and the storage node 2, which is not particularly limited. Running management service in each storage node; the at least two storage nodes comprise a first storage node with role information as a manager and a second storage node with role information not as the manager.
The second storage node may be configured to determine whether role information of the second storage node is a manager through an election mechanism under a management service running in each storage node after detecting that the first storage node has a fault; if yes, judging whether the self is configured with address information for accessing the storage system, and if not, acquiring and configuring the address information.
It should be noted that the management services running in the storage nodes may communicate with each other, for example, the management services may include a zookeeper service, and each storage node may detect that a storage node whose role information is a manager fails through an event notification mechanism of the zookeeper service.
Specifically, the second storage node may receive the failure prompt information through a zookeeper service operated by the second storage node, and if the storage node receives the failure prompt information, the storage node (the first storage node) whose role information is a manager fails.
In this case, a new administrator may be elected through an election mechanism under the zookeeper service. As an embodiment, the second storage node may determine whether itself is a temporary administrator through the election mechanism:
if so, initiating election, determining the role information of each storage node in the storage system according to the voting information sent by each election participant, and identifying the role information of each storage node by using the management service operated in each storage node;
if not, judging whether the user is an election participant, if so, sending voting information to the temporary manager after the temporary manager initiates election.
Specifically, through the zookeeper service, a temporary administrator may be created that may initiate elections. The temporary administrator may designate other storage nodes as election participants: all storage nodes except the storage nodes can be designated as election participants, odd storage nodes can be designated as election participants at will, and the method is not limited specifically.
The storage nodes designated as election participants send voting information to the temporary administrator. And the temporary manager determines the role information of each storage node (namely determines a manager and a non-manager) according to the received voting information sent by each election participant. And the temporary manager identifies the role information of each storage node by using the zookeeper service operated in each storage node. Therefore, after election is finished, each storage node can judge whether own role information is a manager or not according to the role information identified in the zookeeper service operated by the storage node.
Similarly, the second storage node may determine, after the election is finished, whether its role information is a manager, if so, determine whether it is configured with address information for accessing the storage system, and if not, acquire and configure the address information.
In this embodiment, if the second storage node determines that the own role information is not the administrator, the second storage node may determine whether the second storage node is configured with address information for accessing the storage system, and if the second storage node is configured, delete the address information.
The address information may be understood as a virtual IP address, that is, a virtual IP address provided by the storage system to the outside, through which the user can access the storage system. Only the manager configures the virtual IP address in the storage system, so if the original manager fails, a storage node becomes a new manager, and the new manager should configure the address information. Specifically, the address information may be directly obtained through a command line.
In addition, if a non-administrator configures the address information, the storage system may have an unknown error, and thus, when the storage node determines that the own role information is not an administrator and configures the address information, the storage node should delete the address information from itself.
In an embodiment of the present invention, each storage node may store a database, and the storage node may update the database stored in the storage node itself after receiving the data change information through a management service running in the storage node itself.
Specifically, if a storage node in the storage system has data change, the storage node may notify the data change event to each storage node through an event notification mechanism of the zookeeper service. Each storage node can receive data change information through a zookeeper service operated by the storage node.
The data change may include a change of index information and may also include a change of node information. For example, when data is added, deleted or moved in the storage system, the index information of the data is changed; when a storage node in the storage system is newly added or deleted, the node information is changed. The database may include both index information and node information.
In one embodiment, the data change information may include index information of the changed data, so that the index information in the database may be updated based on the index information of the changed data included in the data change information.
In one embodiment, the data change information may include node information of the change storage node, so that the node information in the database may be updated based on the node information of the change storage node included in the data change information.
In one embodiment, the data change information may only play a role of presentation without including index information or node information. After receiving the data change information, the storage nodes read the index information of the data stored in each storage node and the node information of each storage node; comparing the read index information with index information in a database to obtain a first comparison result; comparing the read node information with node information in a database to obtain a second comparison result; and updating the database according to the first comparison result and the second comparison result.
For convenience of description, the following contents collectively refer to index information and node information as records.
Specifically, the record in each storage node may be compared (assumed to be a) with the record B of its own database, and if some content a1 exists only in a but not in B, a1 may be inserted into its own database.
If there is some content B1 that exists only in B and not in A, and there is no B1 in the children of the storage node to which B1 corresponds, then B1 may be deleted from the local database.
If some content B2 exists only in the storage node corresponding to B2, and the child node does not exist under the storage node corresponding to B2, the data in A can be considered lost, and in this case, the record in the storage node corresponding to B2 can be updated.
In this embodiment, a first version number corresponding to each piece of index information and a second version number corresponding to each piece of node information may be further stored in the database, so that the index information and the corresponding first version number in the database may be updated according to the first comparison result; and updating the node information in the database and a second version number corresponding to the node information according to the second comparison result.
Specifically, each record is updated once, and its corresponding version number may be increased by 1.
Since the version number of each record is stored, in the process of updating the records in the storage node corresponding to B2, the record with the maximum version number, that is, the latest record, can be determined from the records in each storage node, and the record in the storage node corresponding to B2 is updated according to the latest record. In addition, other storage nodes may update their own databases based on the latest records.
It should be noted that, if the storage node goes online again after a failure occurs, the database of the storage node may also be updated according to the database of each storage node in the storage system.
One specific embodiment is described below:
management services are operated on all storage nodes in the storage system, and the management services comprise zookeeper services. When a manager (a first storage node) in the storage system fails, other storage nodes (a second storage node) detect that the manager fails through an event notification mechanism of the zookeeper service.
Through the election mechanism under the zookeeper service, a new administrator can be elected. Specifically, through the zookeeper service, a temporary administrator may be created that may initiate elections. The temporary administrator may designate other storage nodes as election participants, specifically, may designate all storage nodes except itself as election participants, may designate odd number of storage nodes as election participants at will, and is not limited specifically.
The storage nodes designated as election participants send voting information to the temporary administrator. And the temporary manager determines the role information of each storage node (namely determines a manager and a non-manager) according to the received voting information sent by each election participant. And the temporary manager identifies the role information of each storage node by using the zookeeper service operated in each storage node. Therefore, each storage node can judge whether the own role information is a manager according to the role information identified in the zookeeper service operated by the storage node.
The storage node that becomes the new administrator should be configured with the address information so that the storage system can provide management services to the user. Specifically, the address information may be directly obtained through a command line.
In addition, if a non-administrator configures the address information, the storage system may have an unknown error, and thus, when the storage node determines that the own role information is not an administrator and configures the address information, the storage node should delete the address information from itself.
It should be noted that the storage system provided with the management node may also apply the scheme: the system can have two working modes, wherein in the first working mode, the management node and the storage node operate normally, in the second working mode, the management node does not operate or operates as the storage node, and a manager in the storage node performs data management. The system can be switched between two operating modes.
Specifically, the management service running in the storage node may determine the current working mode of the storage system according to the configuration file, and if the current working mode is the second working mode, the present scheme may be executed. That is, the storage system provided with the management node can flexibly select whether to execute the scheme according to the actual situation.
By applying the embodiment of the invention, after the storage node as the manager fails, each storage node is possible to become a new manager by utilizing an election mechanism under the management service operated in each storage node, the new manager configures the address information for accessing the storage system, and the storage system can continue to provide the storage service; therefore, the reliability of the memory system is improved.
Fig. 2 is a schematic flow chart of a storage node management method according to an embodiment of the present invention, where the embodiment of the present invention shown in fig. 2 may be applied to a storage node in a storage system, and management services are run in each storage node in the storage system; the embodiment of the present invention shown in fig. 2 may also be applied to the second storage node in the embodiment of the present invention shown in fig. 1. Fig. 2 includes:
s201: after detecting that a storage node with the role information as a manager fails, judging whether the own role information is the manager or not through an election mechanism under management service running in each storage node; if so, S202 is performed.
As an embodiment, management services may be run in storage nodes in the storage system, and the management services run in the storage nodes may communicate with each other, for example, the management services may include a zookeeper service, and each storage node may detect that a storage node whose role information is a manager fails through an event notification mechanism of the zookeeper service.
Specifically, the storage node may receive the failure prompt information through a zookeeper service operated by the storage node, and if the storage node receives the failure prompt information, the storage node whose role information is a manager fails.
In this case, a new administrator may be elected through an election mechanism under the zookeeper service. As an implementation manner, the storage node may determine whether itself is a temporary administrator through the election mechanism:
if so, initiating election, determining the role information of each storage node in the storage system according to the voting information sent by each election participant, and identifying the role information of each storage node by using the management service operated in each storage node;
if not, judging whether the user is an election participant, if so, sending voting information to the temporary manager after the temporary manager initiates election.
Specifically, through the zookeeper service, a temporary administrator may be created that may initiate elections. The temporary administrator may designate other storage nodes as election participants, specifically, may designate all storage nodes except itself as election participants, may designate odd number of storage nodes as election participants at will, and is not limited specifically.
The storage nodes designated as election participants send voting information to the temporary administrator. And the temporary manager determines the role information of each storage node (namely determines a manager and a non-manager) according to the received voting information sent by each election participant. And the temporary manager identifies the role information of each storage node by using the zookeeper service operated in each storage node. Therefore, after election is finished, each storage node can judge whether own role information is a manager or not according to the role information identified in the zookeeper service operated by the storage node.
S202: and judging whether the self is configured with address information for accessing the storage system, if not, executing S203.
S203: and acquiring and configuring the address information.
In this embodiment, if the storage node determines that the own role information is not the administrator, the storage node may determine whether the storage node is configured with address information for accessing the storage system, and if the storage node is configured, delete the address information.
The address information may be understood as a virtual IP address, that is, a virtual IP address provided by the storage system to the outside, through which the user can access the storage system. Only the manager configures the virtual IP address in the storage system, so if the original manager fails, a storage node becomes a new manager, and the new manager should configure the address information. Specifically, the address information may be directly obtained through a command line.
In addition, if a non-administrator configures the address information, the storage system may have an unknown error, and thus, when the storage node determines that the own role information is not an administrator and configures the address information, the storage node should delete the address information from itself.
By applying the embodiment shown in fig. 2 of the present invention, after a storage node as a manager fails, each storage node may become a new manager by using an election mechanism under a management service running in each storage node, and the new manager configures address information for accessing the storage system, so that the storage system can continue to provide the storage service; therefore, the reliability of the memory system is improved.
In an embodiment of the present invention, each storage node may store a database, and the storage node may update the database stored in the storage node itself after receiving the data change information through a management service running in the storage node itself.
Specifically, if a storage node in the storage system has data change, the storage node may notify the data change event to each storage node through an event notification mechanism of the zookeeper service. Each storage node can receive data change information through a zookeeper service operated by the storage node.
The data change may include a change of index information and may also include a change of node information. For example, when data is added, deleted or moved in the storage system, the index information of the data is changed; when a storage node in the storage system is newly added or deleted, the node information is changed. The database may include both index information and node information.
In one embodiment, the data change information may include index information of the changed data, so that the index information in the database may be updated based on the index information of the changed data included in the data change information.
In one embodiment, the data change information may include node information of the change storage node, so that the node information in the database may be updated based on the node information of the change storage node included in the data change information.
In one embodiment, the data change information may only play a role of presentation without including index information or node information. After receiving the data change information, the storage nodes read the index information of the data stored in each storage node and the node information of each storage node; comparing the read index information with index information in a database to obtain a first comparison result; comparing the read node information with node information in a database to obtain a second comparison result; and updating the database according to the first comparison result and the second comparison result.
For convenience of description, the following contents collectively refer to index information and node information as records.
Specifically, the record in each storage node may be compared (assumed to be a) with the record B of its own database, and if some content a1 exists only in a but not in B, a1 may be inserted into its own database.
If there is some content B1 that exists only in B and not in A, and there is no B1 in the children of the storage node to which B1 corresponds, then B1 may be deleted from the local database.
If some content B2 exists only in the storage node corresponding to B2, and the child node does not exist under the storage node corresponding to B2, the data in A can be considered lost, and in this case, the record in the storage node corresponding to B2 can be updated.
In this embodiment, a first version number corresponding to each piece of index information and a second version number corresponding to each piece of node information may be further stored in the database, so that the index information and the corresponding first version number in the database may be updated according to the first comparison result; and updating the node information in the database and a second version number corresponding to the node information according to the second comparison result.
Specifically, each record is updated once, and its corresponding version number may be increased by 1.
Since the version number of each record is stored, in the process of updating the records in the storage node corresponding to B2, the record with the maximum version number, that is, the latest record, can be determined from the records in each storage node, and the record in the storage node corresponding to B2 is updated according to the latest record. In addition, other storage nodes may update their own databases based on the latest records.
It should be noted that, if the storage node goes online again after a failure occurs, the database of the storage node may also be updated according to the database of each storage node in the storage system.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1.一种存储系统,其特征在于,包括至少两台存储节点,每台存储节点中运行管理服务;所述至少两台存储节点中包含角色信息为管理者的第一存储节点、及角色信息不为管理者的第二存储节点;1. A storage system, characterized in that it comprises at least two storage nodes, each of which runs a management service; the at least two storage nodes include a first storage node whose role information is a manager, and role information A second storage node that is not a manager; 所述第二存储节点,用于检测到所述第一存储节点出现故障后,通过各存储节点中运行的管理服务下的选举机制,判断自身角色信息是否为管理者;如果是,判断自身是否配置有访问所述存储系统的地址信息,如果未配置,则获取并配置所述地址信息;The second storage node is configured to, after detecting the failure of the first storage node, determine whether its role information is a manager through the election mechanism under the management service running in each storage node; if so, determine whether it is a manager Configured with address information for accessing the storage system, and if not configured, obtain and configure the address information; 所述第二存储节点,还用于通过所述选举机制,判断自身是否为临时管理者:The second storage node is also used to determine whether it is a temporary manager through the election mechanism: 如果是,发起选举,根据每个选举参与者发送的投票信息,确定所述存储系统中各存储节点的角色信息,并利用所述各存储节点中运行的管理服务,对所述各存储节点的角色信息进行标识,以使所述各存储节点根据所述标识确定自身角色信息;If yes, initiate an election, determine the role information of each storage node in the storage system according to the voting information sent by each election participant, and use the management service running in the storage node to check the status of each storage node. The role information is identified, so that each storage node determines its own role information according to the identification; 如果否,判断自身是否为选举参与者,如果是选举参与者,在临时管理者发起选举后,将投票信息发送给临时管理者。If not, determine whether it is an election participant. If it is an election participant, after the temporary manager initiates the election, the voting information is sent to the temporary manager. 2.根据权利要求1所述的系统,其特征在于,2. The system of claim 1, wherein: 所述第二存储节点,还用于在判断自身角色信息不为管理者的情况下,判断自身是否配置有访问所述存储系统的地址信息,如果已配置,则删除所述地址信息。The second storage node is further configured to determine whether the second storage node is configured with address information for accessing the storage system under the condition that its own role information is not an administrator, and if configured, delete the address information. 3.根据权利要求1所述的系统,其特征在于,3. The system of claim 1, wherein: 所述第二存储节点,还用于通过自身运行的管理服务,接收故障提示信息,所述故障提示信息表示所述第一存储节点出现故障;The second storage node is further configured to receive fault prompt information through a management service running by itself, where the fault prompt information indicates that the first storage node is faulty; 所述第二存储节点,还用于选举结束后,根据自身运行的管理服务中标识的角色信息,判断自身角色信息是否管理者。The second storage node is also used for determining whether its own role information is a manager according to the role information identified in the management service running by itself after the election. 4.根据权利要求1所述的系统,其特征在于,4. The system of claim 1, wherein: 所述第二存储节点,还用于通过自身运行的管理服务,接收数据变更信息;根据所述数据变更信息,更新自身存储的数据库。The second storage node is further configured to receive data change information through the management service running by itself; and update the database stored by itself according to the data change information. 5.根据权利要求4所述的系统,其特征在于,所述数据库中存储有所述存储系统中存储数据的索引信息、及所述存储系统中各存储节点的节点信息;5. The system according to claim 4, wherein the database stores index information of data stored in the storage system and node information of each storage node in the storage system; 所述第二存储节点,还用于根据所述数据变更信息中包含的变更数据的索引信息,更新所述数据库中的索引信息;根据所述数据变更信息中包含的变更存储节点的节点信息,更新所述数据库中的节点信息。The second storage node is further configured to update the index information in the database according to the index information of the changed data included in the data change information; and according to the node information of the change storage node included in the data change information, Update node information in the database. 6.根据权利要求4所述的系统,其特征在于,所述数据库中存储有所述存储系统中存储数据的索引信息、及所述存储系统中各存储节点的节点信息;6. The system according to claim 4, wherein the database stores index information of data stored in the storage system and node information of each storage node in the storage system; 所述第二存储节点,还用于读取所述各存储节点存储数据的索引信息、及所述各存储节点的节点信息;将所读取到的索引信息与所述数据库中的索引信息进行对比,得到第一对比结果;将所读取到的节点信息与所述数据库中的节点信息进行对比,得到第二对比结果;根据所述第一对比结果及所述第二对比结果,更新所述数据库。The second storage node is further configured to read the index information of the stored data of the storage nodes and the node information of the storage nodes; compare the read index information with the index information in the database. Contrast to obtain a first comparison result; compare the read node information with the node information in the database to obtain a second comparison result; update all the node information according to the first comparison result and the second comparison result described database. 7.根据权利要求6所述的系统,其特征在于,所述数据库中还存储有每条索引信息对应的第一版本号、及每条节点信息对应的第二版本号;7. The system according to claim 6, wherein the database also stores a first version number corresponding to each piece of index information and a second version number corresponding to each piece of node information; 所述第二存储节点,还用于根据所述第一对比结果,更新所述数据库中的索引信息及其对应的第一版本号;根据所述第二对比结果,更新所述数据库中的节点信息及其对应的第二版本号。The second storage node is further configured to update the index information in the database and its corresponding first version number according to the first comparison result; update the node in the database according to the second comparison result information and its corresponding second version number. 8.一种存储节点管理方法,其特征在于,应用于存储系统中的存储节点,所述存储系统的各存储节点中运行管理服务;所述方法包括:8. A storage node management method, characterized in that it is applied to storage nodes in a storage system, and each storage node of the storage system runs a management service; the method comprises: 检测到角色信息为管理者的存储节点出现故障后,通过各存储节点中运行的管理服务下的选举机制,判断自身角色信息是否为管理者;After detecting that the storage node whose role information is the manager is faulty, determine whether its own role information is the manager through the election mechanism under the management service running in each storage node; 如果是,判断自身是否配置有访问所述存储系统的地址信息,如果未配置,则获取并配置所述地址信息;If so, determine whether it is configured with address information for accessing the storage system, and if not configured, obtain and configure the address information; 在所述检测到角色信息为管理者的存储节点出现故障之后,所述方法还包括:After detecting that the storage node whose role information is the manager is faulty, the method further includes: 通过所述选举机制,判断自身是否为临时管理者:Through the election mechanism, determine whether it is a temporary manager: 如果是,发起选举,根据每个选举参与者发送的投票信息,确定所述存储系统中各存储节点的角色信息,并利用所述各存储节点中运行的管理服务,对所述各存储节点的角色信息进行标识;If yes, initiate an election, determine the role information of each storage node in the storage system according to the voting information sent by each election participant, and use the management service running in each storage node to check the data of each storage node. Character information for identification; 如果否,判断自身是否为选举参与者,如果是选举参与者,在临时管理者发起选举后,将投票信息发送给临时管理者。If not, determine whether it is an election participant. If it is an election participant, after the temporary manager initiates the election, the voting information is sent to the temporary manager. 9.根据权利要求8所述的方法,其特征在于,在判断自身角色信息不为管理者的情况下,所述方法还包括:9. The method according to claim 8, wherein, in the case of judging that the role information of oneself is not a manager, the method further comprises: 判断自身是否配置有访问所述存储系统的地址信息,如果已配置,则删除所述地址信息。It is judged whether it is configured with address information for accessing the storage system, and if it is configured, the address information is deleted. 10.根据权利要求8所述的方法,其特征在于,检测到角色信息为管理者的存储节点出现故障的步骤包括:10. The method according to claim 8, wherein the step of detecting that the storage node whose role information is the manager is faulty comprises: 通过自身运行的管理服务,接收故障提示信息,所述故障提示信息表示角色信息为管理者的存储节点出现故障;Receive fault prompt information through the management service running by itself, where the fault prompt information indicates that the storage node whose role information is the manager is faulty; 所述通过各存储节点中运行的管理服务下的选举机制,判断自身角色信息是否管理者的步骤包括:The step of judging whether the self-role information is a manager through the election mechanism under the management service running in each storage node includes: 选举结束后,根据自身运行的管理服务中标识的角色信息,判断自身角色信息是否管理者。After the election, according to the role information identified in the management service running by itself, determine whether its own role information is a manager. 11.根据权利要求8所述的方法,其特征在于,所述方法还包括:11. The method of claim 8, wherein the method further comprises: 通过自身运行的管理服务,接收数据变更信息;Receive data change information through its own management service; 根据所述数据变更信息,更新自身存储的数据库。According to the data change information, the database stored by itself is updated. 12.根据权利要求11所述的方法,其特征在于,所述数据库中存储有所述存储系统中存储数据的索引信息、及所述存储系统中各存储节点的节点信息;12. The method according to claim 11, wherein the database stores index information of data stored in the storage system and node information of each storage node in the storage system; 在所述数据变更信息中包含变更数据的索引信息的情况下,所述更新自身存储的数据库的步骤包括:In the case where the data change information includes index information of the changed data, the step of updating the database stored by itself includes: 根据所述数据变更信息中包含的变更数据的索引信息,更新所述数据库中的索引信息;Update the index information in the database according to the index information of the changed data contained in the data change information; 在所述数据变更信息中包含变更存储节点的节点信息的情况下,所述更新自身存储的数据库的步骤包括:When the data change information includes node information for changing the storage node, the step of updating the database stored by itself includes: 根据所述数据变更信息中包含的变更存储节点的节点信息,更新所述数据库中的节点信息。The node information in the database is updated according to the node information of the change storage node included in the data change information. 13.根据权利要求11所述的方法,其特征在于,所述数据库中存储有所述存储系统中存储数据的索引信息、及所述存储系统中各存储节点的节点信息;所述更新自身存储的数据库的步骤包括:13. The method according to claim 11, wherein the database stores index information of data stored in the storage system and node information of each storage node in the storage system; the update itself stores The database steps include: 读取所述各存储节点存储数据的索引信息、及所述各存储节点的节点信息;reading the index information of the stored data of the storage nodes and the node information of the storage nodes; 将所读取到的索引信息与所述数据库中的索引信息进行对比,得到第一对比结果;Comparing the read index information with the index information in the database to obtain a first comparison result; 将所读取到的节点信息与所述数据库中的节点信息进行对比,得到第二对比结果;Comparing the read node information with the node information in the database to obtain a second comparison result; 根据所述第一对比结果及所述第二对比结果,更新所述数据库。The database is updated according to the first comparison result and the second comparison result. 14.根据权利要求13所述的方法,其特征在于,所述数据库中还存储有每条索引信息对应的第一版本号、及每条节点信息对应的第二版本号;所述根据所述第一对比结果及所述第二对比结果,更新所述数据库的步骤包括:14. The method according to claim 13, wherein the database also stores a first version number corresponding to each piece of index information and a second version number corresponding to each piece of node information; The first comparison result and the second comparison result, the step of updating the database includes: 根据所述第一对比结果,更新所述数据库中的索引信息及其对应的第一版本号;According to the first comparison result, update the index information in the database and its corresponding first version number; 根据所述第二对比结果,更新所述数据库中的节点信息及其对应的第二版本号。According to the second comparison result, the node information in the database and its corresponding second version number are updated.
CN201611109234.5A 2016-12-06 2016-12-06 Storage system and storage node management method Active CN108156203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611109234.5A CN108156203B (en) 2016-12-06 2016-12-06 Storage system and storage node management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611109234.5A CN108156203B (en) 2016-12-06 2016-12-06 Storage system and storage node management method

Publications (2)

Publication Number Publication Date
CN108156203A CN108156203A (en) 2018-06-12
CN108156203B true CN108156203B (en) 2021-01-08

Family

ID=62467661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611109234.5A Active CN108156203B (en) 2016-12-06 2016-12-06 Storage system and storage node management method

Country Status (1)

Country Link
CN (1) CN108156203B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189854B (en) * 2018-08-14 2021-06-08 新华三技术有限公司成都分公司 Method and node equipment for providing continuous service
CN109167660B (en) * 2018-09-07 2021-05-14 腾讯科技(深圳)有限公司 Method and device for electing representative node equipment, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929696A (en) * 2012-09-28 2013-02-13 北京搜狐新媒体信息技术有限公司 Method and device for constructing, submitting and monitoring central nodes of a distributed system
CN103118130A (en) * 2013-02-25 2013-05-22 汉柏科技有限公司 Cluster management method and cluster management system for distributed service
CN104753994A (en) * 2013-12-27 2015-07-01 杭州海康威视系统技术有限公司 Method and device for data synchronization based on cluster server system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9063939B2 (en) * 2011-11-03 2015-06-23 Zettaset, Inc. Distributed storage medium management for heterogeneous storage media in high availability clusters

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929696A (en) * 2012-09-28 2013-02-13 北京搜狐新媒体信息技术有限公司 Method and device for constructing, submitting and monitoring central nodes of a distributed system
CN103118130A (en) * 2013-02-25 2013-05-22 汉柏科技有限公司 Cluster management method and cluster management system for distributed service
CN104753994A (en) * 2013-12-27 2015-07-01 杭州海康威视系统技术有限公司 Method and device for data synchronization based on cluster server system

Also Published As

Publication number Publication date
CN108156203A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
JP7665573B2 (en) SYSTEM, METHOD, APPARATUS, AND NON-TRANSITORY COMPUTER-READABLE STORAGE MEDIUM FOR PROVIDING MOBILE DEVICE SUPPORT SERVICES - Patent application
CN115190035B (en) System, method, apparatus and medium for providing mobile device support services
CN112486718B (en) Database fault automatic switching method, device and computer storage medium
CN109308227B (en) Fault detection control method and related equipment
WO2018233630A1 (en) DISCOVERY OF FAILURE
CN112749045A (en) Database cluster switching method, device, storage medium and apparatus
CN108156203B (en) Storage system and storage node management method
CN111176888A (en) Cloud storage disaster recovery method, device and system
CN107819556B (en) Service state switching method and device
CN108509296B (en) Method and system for processing equipment fault
CN112202633B (en) Block chain network testing method and device, electronic equipment and readable storage medium
CN117971401A (en) A distributed transaction processing method, device, electronic device and storage medium
CN109408477A (en) A kind of method, system and associated component that setting group document is locked
CN107515935A (en) A method and system for releasing file lock faults
CN109918439B (en) Data synchronization method and loop detection method and related device applied by same
CN116016211A (en) A network service management method, device, equipment and storage medium
US9380109B2 (en) Resource synchronization control method, device, and system
CN107291575B (en) Processing method and equipment for data center fault
JP5733014B2 (en) Determination program, determination method, and determination apparatus
JP6033189B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
CN116132277A (en) Subnet configuration method, device, computer equipment and storage medium
CN106612299B (en) Access request processing method and device
CN107659435B (en) Interface information processing method and device
US20160012116A1 (en) Data re-transfer with site based three point merges using import records
CN104702495B (en) The method of home gateway and its Auto-matching usage scenario

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant