Increase disk of worker nodes

Steps to increase the disk of worker nodes on an OpenShift 4 cluster on cloudscale.ch.

Starting situtation

  • You already have an OpenShift 4 cluster on cloudscale.ch

  • You have admin-level access to the cluster

  • You want to increase the disk space on worker nodes.

Prerequisites

The following CLI utilities need to be available locally:

Increase node disk via terraform

  1. In the tenant repo, set the parameter openshift4_terraform.terraform_variables.worker_volume_size_gb to the desired value.

  2. Run Commodore to compile the Terraform manifests (should be done automatically via CI pipeline)

  3. Run Terraform on the updated Terraform manifests (should be done automatically via CI pipeline, the apply stage may be triggered manually)

Increase the partition and filesystem on the worker nodes

Once the Terraform pipeline ran through, the worker nodes should have the new disk size. However the partition and filesystem on the worker nodes need to be resized manually:

For each worker node run the following commands:

  1. oc --as=cluster-admin -n syn-debug-nodes debug "node/<worker_node_name>"

  2. chroot /host

  3. lsblk # Check which partition contains the /sysroot mountpoint. Usually this is /dev/sda4

  4. growpart /dev/sda 4

  5. xfs_growfs /dev/sda4