CN107070730A - A kind of startup method and apparatus of CTDB - Google Patents
A kind of startup method and apparatus of CTDB Download PDFInfo
- Publication number
- CN107070730A CN107070730A CN201710457243.1A CN201710457243A CN107070730A CN 107070730 A CN107070730 A CN 107070730A CN 201710457243 A CN201710457243 A CN 201710457243A CN 107070730 A CN107070730 A CN 107070730A
- Authority
- CN
- China
- Prior art keywords
- ctdb
- node
- distant
- configuration file
- end node
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/084—Configuration by using pre-existing information, e.g. using templates or copying from other elements
- H04L41/0846—Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols 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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Power Sources (AREA)
- Telephonic Communication Services (AREA)
Abstract
This application discloses the startup method and apparatus of CTDB a kind of, this method is included in after the present node Maintenance and Repair in file system cluster, and upper electricity restarts the present node;A distant-end node is chosen, in the case where meeting preparatory condition, the configuration file of the CTDB of the synchronous present node configuration file and the CTDB of the distant-end node;Start the CTDB of the present node.Above-mentioned CTDB startup method and apparatus, can make present node provide other node identicals with cluster after service starts and service, without change configuration file and the service of restarting manually, evade the mistake artificially produced, improve the maintainability and stability of cluster.
Description
Technical field
The invention belongs to storage device technical field, more particularly to a kind of CTDB startup method and apparatus.
Background technology
After file system clustered deploy(ment) success, continual offer file service, file service must pass through samba etc.
Software is supplied to client to use, and samba softwares are a kind of protocol realizations that a kind of client accesses file in file system, are led to
Cross the protocol client to be communicated with the samba softwares on clustered node, carry out file access, wherein samba softwares are in collection
Exist on group node in the form of service processes.
CTDB is a kind of cluster management software of High Availabitity, and CTDB can be used to manage samba services on clustered node
Start and stop, samba services can also start when CTDB starts, samba services can also stop when CTDB stops, CTDB management
Samba softwares are, by the CTDB_MANAGES_SAMBA in its configuration file ctdbd.conf, to be worth CTDB during for yes and manage
Samba startup stops, and does not manage samba softwares when being worth for no.
During file system cluster use, the node in cluster can carry out power-off service maintenance, complete in Maintenance and Repair
Restart into re-powering, rejoin in cluster, during Maintenance and Repair and rejoining cluster, other normal sections in cluster
Samba configuration files on point may be changed, such as:New directory etc. is exported, after repair and maintenance node rejoins cluster
It can not provide and be serviced with other node identicals samba, it is necessary to which the samba configuration files of node are safeguarded in change manually, then
Restart samba services, artificial modification also increases error rate.
The content of the invention
To solve the above problems, the invention provides the startup method and apparatus of CTDB a kind of, can be after service starts
Make present node provide other node identicals with cluster to service, without change configuration file and the service of restarting manually, evade people
For the mistake of generation, the maintainability and stability of cluster are improved.
A kind of startup method for CTDB that the present invention is provided, including:
After present node Maintenance and Repair in file system cluster, upper electricity restarts the present node;
A distant-end node is chosen, in the case where meeting preparatory condition, the CTDB of synchronous present node configuration
The configuration file of file and the CTDB of the distant-end node;
Start the CTDB of the present node.
It is preferred that, in above-mentioned CTDB startup method, the preparatory condition includes:
The CTDB flags of the distant-end node are checked, if being not 0, another distant-end node are selected, if 0,
Then perform next step;
Judge the CTDB states of the distant-end node, when not being OK, then select another distant-end node, if OK,
Then perform next step;
Check whether the CTDB of the present node manages the configuration file, if it is, next step is performed, if
No, then the CTDB of the present node starts;
Check whether the configuration file of the distant-end node and the present node is identical, synchronous life is sent if different
Order.
It is preferred that, it is described to check matching somebody with somebody for the distant-end node and the present node in above-mentioned CTDB startup method
Put file whether be all mutually:
Check whether the MD5 values of the configuration file of the distant-end node and the present node are identical.
It is preferred that, in above-mentioned CTDB startup method, the configuration file is that SAMBA configuration files or GANESHA match somebody with somebody
Put file.
A kind of starter for CTDB that the present invention is provided, including:
Restart unit, after the present node Maintenance and Repair in file system cluster, upper electricity, which is restarted, described works as prosthomere
Point;
Synchronization unit, for choosing a distant-end node, in the case where meeting preparatory condition, the synchronous present node
CTDB configuration file and the distant-end node CTDB configuration file;
Start unit, the CTDB for starting the present node.
It is preferred that, in above-mentioned CTDB starter, the synchronization unit includes:
First inspection part, the CTDB flags for checking the distant-end node, if being not 0, select another
Distant-end node, if 0, then performs next step;
Judgement part, the CTDB states for judging the distant-end node when not being OK, then select another distal end to save
Point, if OK, then performs next step;
Second inspection part, for checking whether the CTDB of the present node manages the configuration file, if it is,
Next step is performed, if it is not, then the CTDB of the present node starts;
3rd inspection part, for checking whether the configuration file of the distant-end node and the present node is identical, such as
Fruit difference then sends synch command.
It is preferred that, in above-mentioned CTDB starter, the 3rd inspection part is specifically for checking that the distal end is saved
Whether the MD5 values of the configuration file of point and the present node are identical.
It is preferred that, in above-mentioned CTDB starter, the configuration file is that SAMBA configuration files or GANESHA match somebody with somebody
Put file.
The above-mentioned CTDB provided by foregoing description, the present invention startup method and apparatus, due to this method, including
After present node Maintenance and Repair in file system cluster, upper electricity restarts the present node;A distant-end node is chosen,
In the case of meeting preparatory condition, the CTDB configuration file of the synchronous present node and matching somebody with somebody for the CTDB of the distant-end node
Put file;Start the CTDB of the present node, therefore, it is possible to make present node provide and other sections of cluster after service starts
Point identical service, without change configuration file and the service of restarting manually, evades the mistake artificially produced, improves tieing up for cluster
Shield property and stability.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
The schematic diagram of the startup method for the first CTDB that Fig. 1 provides for the embodiment of the present application;
The schematic diagram of the starter for the first CTDB that Fig. 2 provides for the embodiment of the present application.
Embodiment
The core concept of the present invention is the startup method and apparatus for providing a kind of CTDB, can make to work as after service starts
Front nodal point provides other node identicals with cluster and serviced, and without change configuration file and the service of restarting manually, evades artificial production
Raw mistake, improves the maintainability and stability of cluster.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The startup method for the first CTDB that the embodiment of the present application is provided is as shown in figure 1, Fig. 1 provides for the embodiment of the present application
The first CTDB startup method schematic diagram, this method comprises the following steps:
S1:After present node Maintenance and Repair in file system cluster, upper electricity restarts the present node;
S2:A distant-end node is chosen, in the case where meeting preparatory condition, the CTDB's of the synchronous present node matches somebody with somebody
Put the configuration file of file and the CTDB of the distant-end node;
Here the distant-end node chosen can be any normal node in cluster, CTDB nodes configuration files configuration
The IP (including maintenance node) of all nodes in cluster, therefore the node in nodes is selected when choosing distant-end node successively.
After the two synchronization, it becomes possible to guarantee to provide identical file service, without artificial setting, convenience is added.
S3:Start the CTDB of the present node.
Pass through aforesaid operations, it is ensured that the configuration file on Maintenance and Repair node is kept with the configuration file on other nodes
It is identical, it can be provided after node is restarted successfully and other node identical file services, it is to avoid artificial modification operation, improve collection
The maintainability and stability of group, has evaded the high error rates of manual operation.
The first CTDB provided by foregoing description, the embodiment of the present application startup method, due to being included in text
After present node Maintenance and Repair in part system cluster, upper electricity restarts the present node;A distant-end node is chosen, is being met
In the case of preparatory condition, the CTDB of synchronous present node configuration file and the CTDB of distant-end node configuration text
Part;Start the CTDB of the present node, therefore, it is possible to make present node provide and other node phases of cluster after service starts
Same service, without change configuration file and the service of restarting manually, evades the mistake artificially produced, improves the maintainability of cluster
And stability.
The startup method for second of CTDB that the embodiment of the present application is provided, is the startup method in the first above-mentioned CTDB
On the basis of, in addition to following technical characteristic:
The preparatory condition includes:
The CTDB flags of the distant-end node are checked, if being not 0, just illustrate that this distant-end node starts, then
Another distant-end node is selected, if 0, then next step is performed;
Judge the CTDB states of the distant-end node, when not being OK, illustrate that the CTDB of the distant-end node is not actuated, then select
Another distant-end node is selected, if OK, then next step is performed;
Check whether the CTDB of the present node manages the configuration file, if it is, next step is performed, if
No, then the CTDB of the present node starts;
Check whether the configuration file of the distant-end node and the present node is identical, synchronous life is sent if different
Order, in addition if identical if without synchronous.
Using aforesaid way, can effectively it synchronize, it is ensured that present node is identical with the configuration file of distant-end node
The CTDB of present node startup is just carried out afterwards.
The startup method for the third CTDB that the embodiment of the present application is provided, is the startup method in above-mentioned second of CTDB
On the basis of, in addition to following technical characteristic:
The configuration file for checking the distant-end node and the present node whether be all mutually:
Check whether the MD5 values of the configuration file of the distant-end node and the present node are identical.
It should be noted that MD5 value calculating is simplest judgment mode, but this is only a kind of preferred embodiment, also
Other modes can be used, are not intended to limit herein.
The startup method for the 4th kind of CTDB that the embodiment of the present application is provided, is in the first above-mentioned opening to the third CTDB
In dynamic method it is any on the basis of, in addition to following technical characteristic:
The configuration file is SAMBA configuration files or GANESHA configuration files.
It should be noted that not only can synchronization SAMBA configuration files, when need CTDB manage other software such as
, equally can be synchronous during GANESHA configuration files (configuration file in NFS systems), autgmentability is high.
The starter for the first CTDB that the embodiment of the present application is provided is as shown in Fig. 2 Fig. 2 provides for the embodiment of the present application
The first CTDB starter schematic diagram, the device includes:
Restart unit 201, after the present node Maintenance and Repair in file system cluster, upper electricity is restarted described current
Node;
Synchronization unit 202, it is synchronous described current in the case where meeting preparatory condition for choosing a distant-end node
The configuration file of the CTDB of node configuration file and the CTDB of the distant-end node, the distant-end node chosen here can be collection
The IP (including maintenance node) of all nodes in any normal node in group, CTDB nodes configuration files configuration cluster, because
This selects the node in nodes successively when choosing distant-end node.After the two synchronization, it becomes possible to guarantee to provide phase
Same file service, without artificial setting, adds convenience;
Start unit 203, the CTDB for starting the present node, can so ensure the configuration on Maintenance and Repair node
File is identical with the configuration file holding on other nodes, can be provided after node is restarted successfully and other node identicals text
Part is serviced, it is to avoid artificial modification operation, is improved the maintainability and stability of cluster, has been evaded the high error rates of manual operation.
The starter for second of CTDB that the embodiment of the present application is provided, is the starter in the first above-mentioned CTDB
On the basis of, in addition to following technical characteristic:
The synchronization unit includes:
First inspection part, the CTDB flags for checking the distant-end node, if being not 0, select another
Distant-end node, if 0, then performs next step;
Judgement part, the CTDB states for judging the distant-end node when not being OK, then select another distal end to save
Point, if OK, then performs next step;
Second inspection part, for checking whether the CTDB of the present node manages the configuration file, if it is,
Next step is performed, if it is not, then the CTDB of the present node starts;
3rd inspection part, for checking whether the configuration file of the distant-end node and the present node is identical, such as
Fruit difference then sends synch command.
The starter for the third CTDB that the embodiment of the present application is provided, is the starter in above-mentioned second of CTDB
On the basis of, in addition to following technical characteristic:
3rd inspection part is specifically for the inspection distant-end node and the MD5 of the configuration file of the present node
Whether value is identical.
It should be noted that MD5 value calculating is simplest judgment mode, but this is only a kind of preferred embodiment, also
Other modes can be used, are not intended to limit herein.
The starter for the 4th kind of CTDB that the embodiment of the present application is provided, is in the first above-mentioned opening to the third CTDB
In dynamic device it is any on the basis of, in addition to following technical characteristic:
The configuration file is SAMBA configuration files or GANESHA configuration files.
It should be noted that not only can synchronization SAMBA configuration files, when need CTDB manage other software such as
, equally can be synchronous during GANESHA configuration files (configuration file in NFS systems), autgmentability is high.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.
Claims (8)
1. the startup method of CTDB a kind of, it is characterised in that including:
After present node Maintenance and Repair in file system cluster, upper electricity restarts the present node;
A distant-end node is chosen, in the case where meeting preparatory condition, the CTDB of synchronous present node configuration file
With the CTDB of distant-end node configuration file;
Start the CTDB of the present node.
2. CTDB according to claim 1 startup method, it is characterised in that the preparatory condition includes:
The CTDB flags of the distant-end node are checked, if being not 0, another distant-end node is selected, if 0, then holds
Row next step;
Judge the CTDB states of the distant-end node, when not being OK, then select another distant-end node, if OK, then hold
Row next step;
Check whether the CTDB of the present node manages the configuration file, if it is, next step is performed, if it is not, then
The CTDB of the present node starts;
Check whether the configuration file of the distant-end node and the present node is identical, synch command is sent if different.
3. CTDB according to claim 2 startup method, it is characterised in that the inspection distant-end node and described
The configuration file of present node whether be all mutually:
Check whether the MD5 values of the configuration file of the distant-end node and the present node are identical.
4. the startup method of the CTDB according to claim any one of 1-3, it is characterised in that the configuration file is
SAMBA configuration files or GANESHA configuration files.
5. a kind of CTDB starter, it is characterised in that including:
Restart unit, after the present node Maintenance and Repair in file system cluster, upper electricity restarts the present node;
Synchronization unit, for choosing a distant-end node, in the case where meeting preparatory condition, the synchronous present node
The configuration file of CTDB configuration file and the CTDB of the distant-end node;
Start unit, the CTDB for starting the present node.
6. CTDB according to claim 5 starter, it is characterised in that the synchronization unit includes:
First inspection part, the CTDB flags for checking the distant-end node, if being not 0, select another distal end
Node, if 0, then performs next step;
Judgement part, the CTDB states for judging the distant-end node when not being OK, then select another distant-end node,
If OK, then next step is performed;
Second inspection part, for checking whether the CTDB of the present node manages the configuration file, if it is, performing
Next step, if it is not, then the CTDB of the present node starts;
3rd inspection part, for checking whether the configuration file of the distant-end node and the present node is identical, if not
It is same then send synch command.
7. CTDB according to claim 6 starter, it is characterised in that the 3rd inspection part is specifically for inspection
Whether the MD5 values for looking into the configuration file of the distant-end node and the present node are identical.
8. the starter of the CTDB according to claim any one of 5-7, it is characterised in that the configuration file is
SAMBA configuration files or GANESHA configuration files.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710457243.1A CN107070730B (en) | 2017-06-16 | 2017-06-16 | CTDB starting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710457243.1A CN107070730B (en) | 2017-06-16 | 2017-06-16 | CTDB starting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107070730A true CN107070730A (en) | 2017-08-18 |
CN107070730B CN107070730B (en) | 2020-03-31 |
Family
ID=59594648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710457243.1A Active CN107070730B (en) | 2017-06-16 | 2017-06-16 | CTDB starting method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107070730B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107547654A (en) * | 2017-09-12 | 2018-01-05 | 郑州云海信息技术有限公司 | A kind of distributed objects storage cluster, deployment, method of servicing and system |
CN107766152A (en) * | 2017-10-19 | 2018-03-06 | 郑州云海信息技术有限公司 | Management method, system, device and the readable storage medium storing program for executing of load balancing service |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102916974A (en) * | 2012-11-07 | 2013-02-06 | 曙光信息产业股份有限公司 | Cluster configuration updating method |
CN103607462A (en) * | 2013-11-22 | 2014-02-26 | 曙光信息产业股份有限公司 | Cluster NAS deployment system and deployment method thereof |
US20150172111A1 (en) * | 2013-12-14 | 2015-06-18 | Netapp, Inc. | Techniques for san storage cluster synchronous disaster recovery |
CN105262820A (en) * | 2015-10-29 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Cluster multi-computer mutual backup method based on Linux operating system |
CN106339387A (en) * | 2015-07-08 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Data synchronization method and device of server newly added to database cluster |
CN106528574A (en) * | 2015-09-14 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Data synchronization method and device |
-
2017
- 2017-06-16 CN CN201710457243.1A patent/CN107070730B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102916974A (en) * | 2012-11-07 | 2013-02-06 | 曙光信息产业股份有限公司 | Cluster configuration updating method |
CN103607462A (en) * | 2013-11-22 | 2014-02-26 | 曙光信息产业股份有限公司 | Cluster NAS deployment system and deployment method thereof |
US20150172111A1 (en) * | 2013-12-14 | 2015-06-18 | Netapp, Inc. | Techniques for san storage cluster synchronous disaster recovery |
CN106339387A (en) * | 2015-07-08 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Data synchronization method and device of server newly added to database cluster |
CN106528574A (en) * | 2015-09-14 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Data synchronization method and device |
CN105262820A (en) * | 2015-10-29 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Cluster multi-computer mutual backup method based on Linux operating system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107547654A (en) * | 2017-09-12 | 2018-01-05 | 郑州云海信息技术有限公司 | A kind of distributed objects storage cluster, deployment, method of servicing and system |
CN107766152A (en) * | 2017-10-19 | 2018-03-06 | 郑州云海信息技术有限公司 | Management method, system, device and the readable storage medium storing program for executing of load balancing service |
Also Published As
Publication number | Publication date |
---|---|
CN107070730B (en) | 2020-03-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103744809B (en) | Vehicle information management system double hot standby method based on VRRP | |
CN109992571B (en) | Online closed-loop checking system and checking method for configuration file of intelligent substation | |
CN105099739B (en) | One kind being based on plug-in type software deployment method, apparatus and application server | |
CN106656589B (en) | A kind of server dual-machine hot backup system | |
CN102681917B (en) | A kind of operating system and restorative procedure thereof | |
CN106850260A (en) | A kind of dispositions method and device of virtual resources management platform | |
CN106407030A (en) | Failure processing method and system for storage cluster system | |
CN102098590A (en) | Automatic upgrading method and system of firmware version of optical network unit | |
CN105306605B (en) | A kind of double host server systems | |
CN107153571A (en) | A kind of dispositions method and device of virtual management node | |
CN103532753A (en) | Double-computer hot standby method based on memory page replacement synchronization | |
CN107070730A (en) | A kind of startup method and apparatus of CTDB | |
CN108228733A (en) | A kind of file syn chronizing system and method | |
CN107612774A (en) | A kind of multi-channel synchronous sleep method and system | |
CN110995871A (en) | Method for realizing high availability of KV storage service | |
WO2014040488A1 (en) | Method and device for guaranteeing consistency of planning data | |
CN110896363B (en) | Plug-and-play access configuration method for IEC61850 intelligent device | |
CN105302680A (en) | Automatic testing method for AC stability of RACK cabinet | |
CN103685191B (en) | Data synchronizing system and method | |
CN107786650A (en) | A kind of synchronous method, the apparatus and system of storage medium and management strategy | |
CN107547160A (en) | A kind of method for synchronizing time and device | |
CN104022515B (en) | Reactive compensation cabinet and the control method of reactive compensation unit | |
CN105357060A (en) | Method, device and system for obtaining network equipment performance data | |
CN111400107B (en) | Self-starting recovery system and method for database multi-master cluster | |
CN105323289A (en) | Distributed data synchronization method |
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 |