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/installation-disk-partitioning-upi-templates.adoc
+31-77Lines changed: 31 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,58 +29,13 @@ It is recommended that disk partitioning for {product-title} be left to the inst
29
29
30
30
Storing the contents of a `/var` directory separately makes it easier to grow storage for those areas as needed and reinstall {product-title} at a later date and keep that data intact. With this method, you will not have to pull all your containers again, nor will you have to copy massive log files when you update systems.
31
31
32
-
Because `/var` must be in place before a fresh installation of {op-system-first}, the following procedure sets up the separate `/var` partition by creating a machine config that is inserted during the `openshift-install` preparation phases of an {product-title} installation.
32
+
Because `/var` must be in place before a fresh installation of {op-system-first}, the following procedure sets up the separate `/var` partition by creating a machine config manifest that is inserted during the `openshift-install` preparation phases of an {product-title} installation.
33
33
34
34
[IMPORTANT]
35
35
====
36
36
If you follow the steps to create a separate `/var` partition in this procedure, it is not necessary to create the Kubernetes manifest and Ignition config files again as described later in this section.
37
37
====
38
38
39
-
.Prerequisites
40
-
41
-
* If container storage is on the root partition, ensure that this root partition is mounted with the `pquota` option by including `rootflags=pquota` in the GRUB command line.
42
-
43
-
* If the container storage is on a partition that is mounted by `/etc/fstab`, ensure that the following mount option is included in the `/etc/fstab` file:
44
-
+
45
-
[source,terminal]
46
-
----
47
-
/dev/sdb1 /var xfs defaults,pquota 0 0
48
-
----
49
-
50
-
* If the container storage is on a partition that is mounted by `systemd`, ensure that the `MachineConfig` object includes the following mount option as in this example:
51
-
+
52
-
[source,yaml]
53
-
----
54
-
spec:
55
-
config:
56
-
ignition:
57
-
version: 3.2.0
58
-
storage:
59
-
disks:
60
-
- device: /dev/sdb
61
-
partitions:
62
-
- label: var
63
-
sizeMiB: 240000
64
-
startMiB: 0
65
-
filesystems:
66
-
- device: /dev/disk/by-partlabel/var
67
-
format: xfs
68
-
path: /var
69
-
systemd:
70
-
units:
71
-
- contents: |
72
-
[Unit]
73
-
Before=local-fs.target
74
-
[Mount]
75
-
Where=/var
76
-
What=/dev/disk/by-partlabel/var
77
-
Options=defaults,pquota
78
-
[Install]
79
-
WantedBy=local-fs.target
80
-
enabled: true
81
-
name: var.mount
82
-
----
83
-
84
39
.Procedure
85
40
86
41
. Create a directory to hold the {product-title} installation files:
@@ -125,48 +80,47 @@ $ ls $HOME/clusterconfig/openshift/
125
80
...
126
81
----
127
82
128
-
. Create a `MachineConfig` object and add it to a file in the `openshift` directory. For example, name the file `98-var-partition.yaml`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This attaches storage to a separate `/var` directory.
129
-
83
+
. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This example places the `/var` directory on a separate partition:
130
84
+
131
85
[source,yaml]
132
86
----
133
-
apiVersion: machineconfiguration.openshift.io/v1
134
-
kind: MachineConfig
87
+
variant: openshift
88
+
version: 4.9.0
135
89
metadata:
136
90
labels:
137
91
machineconfiguration.openshift.io/role: worker
138
92
name: 98-var-partition
139
-
spec:
140
-
config:
141
-
ignition:
142
-
version: 3.2.0
143
-
storage:
144
-
disks:
145
-
- device: /dev/<device_name> <1>
146
-
partitions:
147
-
- sizeMiB: <partition_size>
148
-
startMiB: <partition_start_offset> <2>
149
-
label: var
150
-
filesystems:
151
-
- path: /var
152
-
device: /dev/disk/by-partlabel/var
153
-
format: xfs
154
-
systemd:
155
-
units:
156
-
- name: var.mount
157
-
enabled: true
158
-
contents: |
159
-
[Unit]
160
-
Before=local-fs.target
161
-
[Mount]
162
-
Where=/var
163
-
What=/dev/disk/by-partlabel/var
164
-
[Install]
165
-
WantedBy=local-fs.target
93
+
storage:
94
+
disks:
95
+
- device: /dev/<device_name> <1>
96
+
partitions:
97
+
- label: var
98
+
start_mib: <partition_start_offset> <2>
99
+
size_mib: <partition_size> <3>
100
+
filesystems:
101
+
- device: /dev/disk/by-partlabel/var
102
+
path: /var
103
+
format: xfs
104
+
mount_options: [defaults, prjquota] <4>
105
+
with_mount_unit: true
166
106
----
167
107
+
168
108
<1> The storage device name of the disk that you want to partition.
169
109
<2> When adding a data partition to the boot disk, a minimum value of 25000 MiB (Mebibytes) is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition.
110
+
<3> The size of the data partition in mebibytes.
111
+
<4> The `prjquota` mount option must be enabled for filesystems used for container storage.
112
+
+
113
+
[NOTE]
114
+
====
115
+
When creating a separate `/var` partition, you cannot use different instance types for worker nodes, if the different instance types do not have the same device name.
116
+
====
117
+
118
+
. Create a manifest from the Butane config and save it to the `clusterconfig/openshift` directory. For example, run the following command:
Copy file name to clipboardExpand all lines: modules/installation-disk-partitioning.adoc
+31-79Lines changed: 31 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,54 +45,9 @@ Storing the contents of a `/var` directory separately makes it easier to grow st
45
45
46
46
Because `/var` must be in place before a fresh installation of
47
47
{op-system-first}, the following procedure sets up the separate `/var` partition
48
-
by creating a machine config that is inserted during the `openshift-install`
48
+
by creating a machine config manifest that is inserted during the `openshift-install`
49
49
preparation phases of an {product-title} installation.
50
50
51
-
.Prerequisites
52
-
53
-
* If container storage is on the root partition, ensure that this root partition is mounted with the `pquota` option by including `rootflags=pquota` in the GRUB command line.
54
-
55
-
* If the container storage is on a partition that is mounted by `/etc/fstab`, ensure that the following mount option is included in the `/etc/fstab` file:
56
-
+
57
-
[source,terminal]
58
-
----
59
-
/dev/sdb1 /var xfs defaults,pquota 0 0
60
-
----
61
-
62
-
* If the container storage is on a partition that is mounted by `systemd`, ensure that the `MachineConfig` object includes the following mount option as in this example:
63
-
+
64
-
[source,yaml]
65
-
----
66
-
spec:
67
-
config:
68
-
ignition:
69
-
version: 3.2.0
70
-
storage:
71
-
disks:
72
-
- device: /dev/sdb
73
-
partitions:
74
-
- label: var
75
-
sizeMiB: 240000
76
-
startMiB: 0
77
-
filesystems:
78
-
- device: /dev/disk/by-partlabel/var
79
-
format: xfs
80
-
path: /var
81
-
systemd:
82
-
units:
83
-
- contents: |
84
-
[Unit]
85
-
Before=local-fs.target
86
-
[Mount]
87
-
Where=/var
88
-
What=/dev/disk/by-partlabel/var
89
-
Options=defaults,pquota
90
-
[Install]
91
-
WantedBy=local-fs.target
92
-
enabled: true
93
-
name: var.mount
94
-
----
95
-
96
51
.Procedure
97
52
98
53
. Create a directory to hold the {product-title} installation files:
@@ -117,50 +72,47 @@ $ ls $HOME/clusterconfig/openshift/
117
72
...
118
73
----
119
74
120
-
. Create a `MachineConfig` object and add it to a file in the `openshift` directory.
121
-
For example, name the file `98-var-partition.yaml`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This attaches storage to a separate `/var`
122
-
directory.
123
-
75
+
. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This example places the `/var` directory on a separate partition:
124
76
+
125
77
[source,yaml]
126
78
----
127
-
apiVersion: machineconfiguration.openshift.io/v1
128
-
kind: MachineConfig
79
+
variant: openshift
80
+
version: 4.9.0
129
81
metadata:
130
82
labels:
131
83
machineconfiguration.openshift.io/role: worker
132
84
name: 98-var-partition
133
-
spec:
134
-
config:
135
-
ignition:
136
-
version: 3.2.0
137
-
storage:
138
-
disks:
139
-
- device: /dev/<device_name> <1>
140
-
partitions:
141
-
- sizeMiB: <partition_size>
142
-
startMiB: <partition_start_offset> <2>
143
-
label: var
144
-
filesystems:
145
-
- path: /var
146
-
device: /dev/disk/by-partlabel/var
147
-
format: xfs
148
-
systemd:
149
-
units:
150
-
- name: var.mount
151
-
enabled: true
152
-
contents: |
153
-
[Unit]
154
-
Before=local-fs.target
155
-
[Mount]
156
-
Where=/var
157
-
What=/dev/disk/by-partlabel/var
158
-
[Install]
159
-
WantedBy=local-fs.target
85
+
storage:
86
+
disks:
87
+
- device: /dev/<device_name> <1>
88
+
partitions:
89
+
- label: var
90
+
start_mib: <partition_start_offset> <2>
91
+
size_mib: <partition_size> <3>
92
+
filesystems:
93
+
- device: /dev/disk/by-partlabel/var
94
+
path: /var
95
+
format: xfs
96
+
mount_options: [defaults, prjquota] <4>
97
+
with_mount_unit: true
160
98
----
161
99
+
162
100
<1> The storage device name of the disk that you want to partition.
163
101
<2> When adding a data partition to the boot disk, a minimum value of 25000 mebibytes is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition.
102
+
<3> The size of the data partition in mebibytes.
103
+
<4> The `prjquota` mount option must be enabled for filesystems used for container storage.
104
+
+
105
+
[NOTE]
106
+
====
107
+
When creating a separate `/var` partition, you cannot use different instance types for worker nodes, if the different instance types do not have the same device name.
108
+
====
109
+
110
+
. Create a manifest from the Butane config and save it to the `clusterconfig/openshift` directory. For example, run the following command:
Copy file name to clipboardExpand all lines: modules/installation-user-infra-machines-advanced.adoc
+28-37Lines changed: 28 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ Storing the contents of a `/var` directory separately makes it easier to grow st
104
104
105
105
The use of a separate partition for the `/var` directory or a subdirectory of `/var` also prevents data growth in the partitioned directory from filling up the root file system.
106
106
107
-
The following procedure sets up a separate `/var` partition by adding a `MachineConfig` object that is wrapped into the Ignition config file for a node type during the preparation phase of an installation.
107
+
The following procedure sets up a separate `/var` partition by adding a machine config manifest that is wrapped into the Ignition config file for a node type during the preparation phase of an installation.
108
108
109
109
.Procedure
110
110
@@ -115,57 +115,48 @@ The following procedure sets up a separate `/var` partition by adding a `Machine
. Create a `MachineConfig` object and add it to a file in the `./<installation_directory>/openshift` directory.
119
-
For example, name the file `98-var-partition.yaml`,
120
-
change the disk device name to the name of the storage device on the compute nodes,
121
-
and set the storage size as appropriate. This example mounts the `/var` directory on a separate partition:
122
-
118
+
. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This example places the `/var` directory on a separate partition:
123
119
+
124
120
[source,yaml]
125
121
----
126
-
apiVersion: machineconfiguration.openshift.io/v1
127
-
kind: MachineConfig
122
+
variant: openshift
123
+
version: 4.9.0
128
124
metadata:
129
125
labels:
130
126
machineconfiguration.openshift.io/role: worker
131
127
name: 98-var-partition
132
-
spec:
133
-
config:
134
-
ignition:
135
-
version: 3.2.0
136
-
storage:
137
-
disks:
138
-
- device: /dev/<device_name> <1>
139
-
partitions:
140
-
- sizeMiB: <partition_size> <2>
141
-
startMiB: <partition_start_offset> <3>
142
-
label: var
143
-
filesystems:
144
-
- path: /var
145
-
device: /dev/disk/by-partlabel/var
146
-
format: xfs
147
-
systemd:
148
-
units:
149
-
- name: var.mount
150
-
enabled: true
151
-
contents: |
152
-
[Unit]
153
-
Before=local-fs.target
154
-
[Mount]
155
-
Where=/var
156
-
What=/dev/disk/by-partlabel/var
157
-
[Install]
158
-
WantedBy=local-fs.target
128
+
storage:
129
+
disks:
130
+
- device: /dev/<device_name> <1>
131
+
partitions:
132
+
- label: var
133
+
start_mib: <partition_start_offset> <2>
134
+
size_mib: <partition_size> <3>
135
+
filesystems:
136
+
- device: /dev/disk/by-partlabel/var
137
+
path: /var
138
+
format: xfs
139
+
mount_options: [defaults, prjquota] <4>
140
+
with_mount_unit: true
159
141
----
160
142
+
161
143
<1> The storage device name of the disk that you want to partition.
162
-
<2> The size of the data partition in mebibytes.
163
-
<3> When adding a data partition to the boot disk, a minimum offset value of 25000 mebibytes is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no offset value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition.
144
+
<2> When adding a data partition to the boot disk, a minimum offset value of 25000 mebibytes is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no offset value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition.
145
+
<3> The size of the data partition in mebibytes.
146
+
<4> The `prjquota` mount option must be enabled for filesystems used for container storage.
164
147
+
165
148
[NOTE]
166
149
====
167
150
When creating a separate `/var` partition, you cannot use different instance types for compute nodes, if the different instance types do not have the same device name.
168
151
====
152
+
153
+
. Create a manifest from the Butane config and save it to the `clusterconfig/openshift` directory. For example, run the following command:
0 commit comments