You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/operate/rs/clusters/change-node-role.md
+62-5Lines changed: 62 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,15 @@ A Redis Software cluster contains a primary node, which coordinates cluster-wide
14
14
15
15
## Demote primary node
16
16
17
+
{{< multitabs id="demote-node"
18
+
tab1="Cluster Manager UI"
19
+
tab2="rladmin" >}}
20
+
17
21
To demote the primary node to a secondary node using the Cluster Manager UI:
18
22
19
-
1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
23
+
1. On the **Nodes** screen, click <imgsrc="/images/rs/buttons/button-toggle-actions-vertical.png#no-click"alt="More actions button"width="22px"class="inline"> for the primary node you want to demote.
20
24
21
-
{{<imagefilename="images/rs/screenshots/nodes/primary-node-more-actions.png"alt="Click the more actions button for a node to access node actions.">}}
25
+
<imgsrc="../../../../images/rs/screenshots/nodes/primary-node-more-actions.png"alt="Click the more actions button for a node to access node actions.">
22
26
23
27
1. Select **Set as a secondary node** from the list.
24
28
@@ -28,20 +32,73 @@ To demote the primary node to a secondary node using the Cluster Manager UI:
28
32
29
33
-**Choose specific node**: You can manually select which node becomes the new primary node.
30
34
31
-
{{<imagefilename="images/rs/screenshots/nodes/primary-node-set-as-secondary-dialog.png"alt="The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.">}}
35
+
<imgsrc="../../../../images/rs/screenshots/nodes/primary-node-set-as-secondary-dialog.png"alt="The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.">
32
36
33
37
1. Click **Confirm**.
34
38
39
+
-tab-sep-
40
+
41
+
To demote the primary node to a secondary node using `rladmin`:
42
+
43
+
1. Identify the primary node's ID with [`rladmin cluster master`]({{<relref "/operate/rs/references/cli-utilities/rladmin/cluster/master">}}):
44
+
45
+
```sh
46
+
$ rladmin cluster master
47
+
Node <primary-node-id> is the cluster master node
48
+
```
49
+
50
+
1. Run [`rladmin node enslave`]({{<relref "/operate/rs/references/cli-utilities/rladmin/node/enslave/#node-enslave">}}) with the `demote_node` option:
Replace `<primary-node-ID>` with the ID returned by `rladmin cluster master`.
57
+
58
+
{{< /multitabs >}}
59
+
35
60
## Promote secondary node
36
61
62
+
{{< multitabs id="promote-node"
63
+
tab1="Cluster Manager UI"
64
+
tab2="rladmin">}}
65
+
37
66
To promote a secondary node to become the primary node using the Cluster Manager UI:
38
67
39
-
1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
68
+
1. On the **Nodes** screen, click <img src="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline">for the secondary node you want to promote.
40
69
41
-
{{<imagefilename="images/rs/screenshots/nodes/secondary-nodes-more-actions.png"alt="Click the more actions button for a node to access node actions.">}}
70
+
<img src="../../../../images/rs/screenshots/nodes/secondary-nodes-more-actions.png" alt="Click the more actions button for a node to access node actions.">
42
71
43
72
1. Select **Set as the primary node** from the list.
44
73
45
74
1. Click **Confirm**.
46
75
76
+
77
+
-tab-sep-
78
+
79
+
To promote a secondary node to become the primary node using `rladmin`:
80
+
81
+
1. To find the IDs of secondary nodes, run [`rladmin status nodes`]({{<relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes">}}):
82
+
83
+
```sh
84
+
$ rladmin status nodes
85
+
CLUSTER NODES:
86
+
NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS
87
+
node:1 master 198.51.100.2 3d99db1fdf4b 4/100 6 14.74GB/19.54GB 10.73GB/16.02GB 7.22.0-250 OK
88
+
*node:3 slave 198.51.100.4 b87cc06c830f 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK
89
+
node:2 slave 198.51.100.3 fc7a3d332458 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK
90
+
```
91
+
92
+
Nodes with the `slave` role are secondary nodes.
93
+
94
+
1. Run [`rladmin cluster master set`]({{<relref "/operate/rs/references/cli-utilities/rladmin/cluster/master">}}):
95
+
96
+
```sh
97
+
rladmin cluster master set<secondary-node-ID>
98
+
```
99
+
100
+
Replace `<secondary-node-ID>` with the ID of the secondary node you want to promote.
101
+
102
+
{{< /multitabs >}}
103
+
47
104
After this node becomes the primary node, all cluster management traffic is directed to it.
0 commit comments