|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/install_config/installing-customizing.adoc |
| 4 | + |
| 5 | +[id="installation-special-config-raid_{context}"] |
| 6 | +== Configuring a RAID-enabled data volume |
| 7 | + |
| 8 | +You can enable software RAID partitioning to provide an external data volume. {product-title} supports RAID 0, RAID 1, RAID 4, RAID 5, RAID 6, and RAID 10 for data protection and fault tolerance. See "About disk mirroring" for more details. |
| 9 | + |
| 10 | +. Create a Butane config that configures a data volume by using software RAID. |
| 11 | + |
| 12 | +* To configure a data volume with RAID 1 on the same disks that are used for a mirrored boot disk, create a `$HOME/clusterconfig/raid1-storage.bu` file, for example: |
| 13 | ++ |
| 14 | +.RAID 1 on mirrored boot disk |
| 15 | +[source,yaml] |
| 16 | +---- |
| 17 | +variant: openshift |
| 18 | +version: 4.8.0 |
| 19 | +metadata: |
| 20 | + name: raid1-storage |
| 21 | + labels: |
| 22 | + machineconfiguration.openshift.io/role: worker |
| 23 | +boot_device: |
| 24 | + mirror: |
| 25 | + devices: |
| 26 | + - /dev/sda |
| 27 | + - /dev/sdb |
| 28 | +storage: |
| 29 | + disks: |
| 30 | + - device: /dev/sda |
| 31 | + partitions: |
| 32 | + - label: root-1 |
| 33 | + size_mib: 25000 <1> |
| 34 | + - label: var-1 |
| 35 | + - device: /dev/sdb |
| 36 | + partitions: |
| 37 | + - label: root-2 |
| 38 | + size_mib: 25000 <1> |
| 39 | + - label: var-2 |
| 40 | + raid: |
| 41 | + - name: md-var |
| 42 | + level: raid1 |
| 43 | + devices: |
| 44 | + - /dev/disk/by-partlabel/var-1 |
| 45 | + - /dev/disk/by-partlabel/var-2 |
| 46 | + filesystems: |
| 47 | + - device: /dev/md/md-var |
| 48 | + path: /var |
| 49 | + format: xfs |
| 50 | + wipe_filesystem: true |
| 51 | + with_mount_unit: true |
| 52 | +---- |
| 53 | +<1> When adding a data partition to the boot disk, a minimum value of 25000 mebibytes is recommended. 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. |
| 54 | + |
| 55 | +* To configure a data volume with RAID 1 on secondary disks, create a `$HOME/clusterconfig/raid1-alt-storage.bu` file, for example: |
| 56 | ++ |
| 57 | +.RAID 1 on secondary disks |
| 58 | +[source,yaml] |
| 59 | +---- |
| 60 | +variant: openshift |
| 61 | +version: 4.8.0 |
| 62 | +metadata: |
| 63 | + name: raid1-alt-storage |
| 64 | + labels: |
| 65 | + machineconfiguration.openshift.io/role: worker |
| 66 | +storage: |
| 67 | + disks: |
| 68 | + - device: /dev/sdc |
| 69 | + wipe_table: true |
| 70 | + partitions: |
| 71 | + - label: data-1 |
| 72 | + - device: /dev/sdd |
| 73 | + wipe_table: true |
| 74 | + partitions: |
| 75 | + - label: data-2 |
| 76 | + raid: |
| 77 | + - name: md-var-lib-containers |
| 78 | + level: raid1 |
| 79 | + devices: |
| 80 | + - /dev/disk/by-partlabel/data-1 |
| 81 | + - /dev/disk/by-partlabel/data-2 |
| 82 | + filesystems: |
| 83 | + - device: /dev/md/md-var-lib-containers |
| 84 | + path: /var/lib/containers |
| 85 | + format: xfs |
| 86 | + wipe_filesystem: true |
| 87 | + with_mount_unit: true |
| 88 | +---- |
| 89 | + |
| 90 | +. Run Butane to create a RAID manifest from the Butane config you created in the previous step, for example: |
| 91 | ++ |
| 92 | +[source,terminal] |
| 93 | +---- |
| 94 | +$ butane $HOME/clusterconfig/<butane_file> -o ./<manifest_name>.yaml <1> |
| 95 | +---- |
| 96 | +<1> Replace `<butane_file>` and `<manifest_name>` with the file names from the previous step. For example, `raid1-alt-storage.bu` and `raid1-alt-storage.yaml` for secondary disks. |
| 97 | + |
| 98 | +. Apply the manifest to your cluster by running the following command: |
| 99 | ++ |
| 100 | +[source,terminal] |
| 101 | +---- |
| 102 | +$ oc create -f <manifest_name>.yaml |
| 103 | +---- |
| 104 | + |
| 105 | +. Save the Butane config in case you need to update the manifest in the future. |
0 commit comments