Skip to content

Commit ee3c6ec

Browse files
authored
Merge pull request github#25414 from github/repo-sync
repo sync
2 parents e184add + 860fde6 commit ee3c6ec

File tree

1 file changed

+71
-52
lines changed

1 file changed

+71
-52
lines changed

content/admin/enterprise-management/configuring-clustering/evacuating-a-cluster-node.md

Lines changed: 71 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,55 +12,74 @@ topics:
1212
- Clustering
1313
- Enterprise
1414
---
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
54+
```
55+
56+
- **Storage**:
57+
58+
```shell
59+
$ ghe-storage evacuation-status storage-server-<em>UUID</em>
60+
```
61+
1. After the copy is complete, you can evacuate the node by running any of the following commands, replacing `UUID` with the UUID from step 2.
62+
63+
- **Git**:
64+
65+
```shell
66+
$ ghe-spokes server evacuate git-server-<em>UUID</em> \'<em>REASON FOR EVACUATION</em>\'
67+
```
68+
69+
- **{% data variables.product.prodname_pages %}**:
70+
71+
```shell
72+
$ ghe-dpages evacuate pages-server-<em>UUID</em>
73+
```
74+
75+
- For **storage**, first take the node offline by running the following command.
76+
77+
```shell
78+
$ ghe-storage offline storage-server-<em>UUID</em>
79+
```
80+
81+
After the storage node is offline, you can evacuate the node by running the following command.
82+
83+
```shell
84+
$ ghe-storage evacuate storage-server-<em>UUID</em>
85+
```

0 commit comments

Comments
 (0)