| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
set command The set command ensures that the specified IP is up on the given node. It takes two parameters - firstly the name of an IP, and secondly, the name of a node.
If the IP is currently up on the other node to the given one, then it will be taken down on that other node and brought up on the given node. If the write IP is being moved, replication will be synced.
Nothing will happen if the specified IP is already up on the given node and an information message will be displayed. If the specified IP is not up on the other node to the one given (ie. it is not up on either node), no attempt will be made to take down the IP from the other node, but if the write IP is being dealt with, replication will still be synced.
The following example demonstrates the use of the set command:
First, display status of customerdata masterpair:
$ flipper customerdata status MASTERPAIR: customerdata NODE: dell_2850 has read IP, is writable, replication running, 0s delay NODE: hp_dl380 is writable, replication running, 0s delay WARNING: MySQL server on read IP is writable WARNING: No node has the write IP |
Put the write IP on dell_2850:
$ flipper customerdata set write dell_2850 WARNING: write IP is not up on hp_dl380 node. WARNING: Won't attempt to take down write IP on hp_dl380 node. |
Display status again, noticing that dell_2850 now has the write IP:
$ flipper customerdata status MASTERPAIR: customerdata NODE: dell_2850 has read IP, has write IP, is writable, replication running, 0s delay NODE: hp_dl380 is read-only, replication running, 0s delay |
Put the read IP onto hp_dl380:
$ flipper customerdata set read hp_dl380 |
Display status again, noticing that the read IP has moved to hp_dl380:
$ flipper customerdata status MASTERPAIR: customerdata NODE: dell_2850 has write IP, is writable, replication running, 0s delay NODE: hp_dl380 has read IP, is read-only, replication running, 0s delay |
Finally, put write IP on dell_2850. This has no effect, as it's already there:
$ flipper customerdata set write dell_2850 INFO: The write IP is already up on the dell_2850 node. |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |