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/admin/enterprise-management/configuring-clustering/evacuating-a-cluster-node.md
+71-52Lines changed: 71 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,55 +12,74 @@ topics:
12
12
- Clustering
13
13
- Enterprise
14
14
---
15
-
If you only have three nodes in your data services cluster, you can't evacuate the nodes, because `ghe-spokes` doesn’t have another place to make a copy. If you have four or more, `ghe-spokes` will move all the repositories off of the evacuated node.
16
-
17
-
If you're taking a node offline that has any data services (like git, pages, or storage) evacuate each node before taking the node offline.
18
-
19
-
1. Find the `uuid` of the node in with the `ghe-config`command.
20
-
21
-
```shell
22
-
$ ghe-config cluster.<em>HOSTNAME</em>.uuid
23
-
```
24
-
25
-
2. You'll need to monitor the status of your node while the data is being copied. Ideally, the node shouldn't be taken offline until the copying is complete. To monitor the status of your node, run any of the following commands:
26
-
27
-
For Git
28
-
```
29
-
ghe-spokes evac-status
30
-
```
31
-
For {% data variables.product.prodname_pages %}
32
-
33
-
```shell
34
-
echo"select count(*) from pages_replicas where host = 'pages-server-<em>UUID</em>'"| ghe-dbconsole -y
35
-
```
36
-
37
-
For storage
38
-
```
39
-
ghe-storage evacuation-status
40
-
```
41
-
42
-
3. After the copying is complete, you can evacuate the storage service. Run any of the following commands:
43
-
44
-
For Git
45
-
46
-
```shell
47
-
ghe-spokes server evacuate git-server-<em>UUID</em>\'<em>REASON FOR EVACUATION</em>\'
48
-
```
49
-
50
-
For {% data variables.product.prodname_pages %}
51
-
52
-
```shell
53
-
ghe-dpages evacuate pages-server-<em>UUID</em>
54
-
```
55
-
56
-
For storage, take the node offline
57
-
58
-
```shell
59
-
ghe-storage offline storage-server-<em>UUID</em>
60
-
```
61
-
62
-
then evacuate
63
-
64
-
```shell
65
-
ghe-storage evacuate storage-server-<em>UUID</em>
66
-
```
15
+
16
+
## About evacuation of cluster nodes
17
+
18
+
In a cluster configuration for {% data variables.product.product_name %}, you can evacuate a node before taking the node offline. Evacuation ensures that the remaining nodes in a service tier contain all of the service's data. For example, when you replace the virtual machine for a node in your cluster, you should first evacuate the node.
19
+
20
+
For more information about nodes and service tiers for {% data variables.product.prodname_ghe_server %}, see "[About cluster nodes](/admin/enterprise-management/configuring-clustering/about-cluster-nodes)."
21
+
22
+
{% warning %}
23
+
24
+
**Warnings**:
25
+
26
+
- To avoid data loss, {% data variables.product.company_short %} strongly recommends that you evacuate a node before taking the node offline.
27
+
28
+
- If you only have three nodes in your data services cluster, you can't evacuate the nodes because `ghe-spokes` doesn't have another place to make a copy. If you have four or more, `ghe-spokes` will move all the repositories off of the evacuated node.
29
+
30
+
{% endwarning %}
31
+
32
+
## Evacuating a cluster node
33
+
34
+
If you plan to take a node offline and the node runs a data service role like `git-server`, `pages-server`, or `storage-server`, evacuate each node before taking the node offline.
35
+
36
+
{% data reusables.enterprise_clustering.ssh-to-a-node %}
37
+
1. To find the UUID of the node to evacuate, run the following command. Replace `HOSTNAME` with the node's hostname.
38
+
39
+
```shell
40
+
$ ghe-config cluster.<em>HOSTNAME</em>.uuid
41
+
```
42
+
1. Monitor the node's status while {% data variables.product.product_name %} copies the data. Don't take the node offline until the copy is complete. To monitor the status of your node, run any of the following commands, replacing `UUID` with the UUID from step 2.
43
+
44
+
-**Git**:
45
+
46
+
```shell
47
+
$ ghe-spokes evac-status git-server-<em>UUID</em>
48
+
```
49
+
50
+
- **{% data variables.product.prodname_pages %}**:
51
+
52
+
```shell
53
+
$ echo"select count(*) from pages_replicas where host = 'pages-server-<em>UUID</em>'"| ghe-dbconsole -y
0 commit comments