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: modules/move-etcd-different-disk.adoc
+66-45Lines changed: 66 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,36 @@
8
8
9
9
You can move etcd from a shared disk to a separate disk to prevent or resolve performance issues.
10
10
11
-
.Prerequisites
12
-
13
-
* The `MachineConfigPool` must match `metadata.labels[machineconfiguration.openshift.io/role]`. This applies to a controller, worker, or a custom pool.
14
-
* The node's auxiliary storage device, such as `/dev/sdb`, must match the sdb. Change this reference in all places in the file.
11
+
The Machine Config Operator (MCO) is responsible for mounting a secondary disk for {product-title}{product-version} container storage.
15
12
16
13
[NOTE]
17
14
====
18
15
This procedure does not move parts of the root file system, such as `/var/`, to another disk or partition on an installed node.
19
16
====
20
17
21
-
The Machine Config Operator (MCO) is responsible for mounting a secondary disk for an {product-title}{product-version} container storage.
18
+
.Prerequisites
22
19
23
-
Use the following steps to move etcd to a different device:
20
+
* You have installed the {oc-first}.
21
+
* You have access to the cluster with `cluster-admin` privileges.
22
+
* The `MachineConfigPool` must match `metadata.labels[machineconfiguration.openshift.io/role]`. This applies to a controller, worker, or a custom pool.
24
23
25
24
.Procedure
26
-
. Create a `machineconfig` YAML file named `etcd-mc.yml` and add the following information:
25
+
26
+
. Attach the new disk to the cluster and verify that the disk is detected in the node by using the `lsblk` command in a debug shell:
27
+
+
28
+
[source,terminal]
29
+
----
30
+
$ oc debug node/<node_name>
31
+
----
32
+
+
33
+
[source,terminal]
34
+
----
35
+
# lsblk
36
+
----
37
+
+
38
+
Note the device name of the new disk reported by the `lsblk` command.
39
+
40
+
. Create a `MachineConfig` YAML file named `etcd-mc.yml` with contents such as the following, replacing instances of `<new_disk_name>` with the noted device name:
27
41
+
28
42
[source,yaml]
29
43
----
@@ -41,31 +55,31 @@ spec:
41
55
units:
42
56
- contents: |
43
57
[Unit]
44
-
Description=Make File System on /dev/sdb
58
+
Description=Make File System on /dev/<new_disk_name>
. Create the machine configuration by entering the following commands:
130
+
. Log in to the cluster as a user with `cluster-admin` privileges and create the machine configuration:
118
131
+
119
132
[source,terminal]
120
133
----
121
-
$ oc login -u ${ADMIN} -p ${ADMINPASSWORD} ${API}
122
-
... output omitted ...
134
+
$ oc login -u <username> -p <password>
123
135
----
124
136
+
125
137
[source,terminal]
126
138
----
127
139
$ oc create -f etcd-mc.yml
128
-
machineconfig.machineconfiguration.openshift.io/98-var-lib-etcd created
129
-
----
130
-
+
131
-
[source,terminal]
132
-
----
133
-
$ oc login -u ${ADMIN} -p ${ADMINPASSWORD} ${API}
134
-
[... output omitted ...]
135
-
----
136
-
+
137
-
[source,terminal]
138
-
----
139
-
$ oc create -f etcd-mc.yml machineconfig.machineconfiguration.openshift.io/98-var-lib-etcd created
140
140
----
141
141
+
142
142
The nodes are updated and rebooted. After the reboot completes, the following events occur:
143
143
+
144
-
* An XFS file system is created on the specified disk.
145
-
* The disk mounts to `/var/lib/etc`.
146
-
* The content from `/sysroot/ostree/deploy/rhcos/var/lib/etcd` syncs to `/var/lib/etcd`.
147
-
* A restore of `SELinux` labels is forced for `/var/lib/etcd`.
148
-
* The old content is not removed.
149
-
. After the nodes are on a separate disk, update the machine configuration file, `etcd-mc.yml` with the following information:
144
+
* An XFS file system is created on the specified disk.
145
+
* The disk mounts to `/var/lib/etcd`.
146
+
* The content from `/sysroot/ostree/deploy/rhcos/var/lib/etcd` syncs to `/var/lib/etcd`.
147
+
* A restore of `SELinux` labels is forced for `/var/lib/etcd`.
148
+
* The old content is not removed.
149
+
150
+
. After the nodes are on a separate disk, update the `etcd-mc.yml` file with contents such as the following, replacing instances of `<new_disk_name>` with the noted device name:
150
151
+
151
152
[source,yaml]
152
153
----
@@ -164,13 +165,13 @@ spec:
164
165
units:
165
166
- contents: |
166
167
[Unit]
167
-
Description=Mount /dev/sdb to /var/lib/etcd
168
+
Description=Mount /dev/<new_disk_name> to /var/lib/etcd
0 commit comments