SOP Add new capacity to the OCP4 ODF Storage Cluster
-
Red Hat OpenShift Container Platform 4.x cluster has been installed
-
Additional worker nodes are being added to increase the capacity for the cluster
-
These additional worker nodes have storage resources which we wish to add to the Openshift Datafoundation Storage Cluster
-
We are adding enough storage to meet the minimum of 3 replicas. eg: 3 nodes, or enough storage devices that the the number is divisble by 3.
Steps
-
Once a new node has been added to the Openshift cluster, we can manage the extra local storage devices on this node from within Openshift itself, providing that they do not contain file paritions/filesystems. In the case of a node being repurposed, please first ensure that all storage devices except
/dev/sda
are partition and filesystem free before starting. -
From within the Openshift webconsole, or via cli search for all "LocalVolumeDiscovery" objects.
[root@os-control01 ~][PROD-IAD2]# oc get localvolumediscovery --all-namespaces NAMESPACE NAME AGE openshift-local-storage auto-discover-devices 167d
There should really be only a single LocalVolumeDiscovery object called
auto-discover-devices
in theopenshift-local-storage
namespace/project.Edit this object:
oc edit localvolumediscovery auto-discover-devices -n openshift-local-storage
Add the hostname for the new node to the list that is already there like:
... spec: nodeSelector: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - worker01.ocp.iad2.fedoraproject.org - worker02.ocp.iad2.fedoraproject.org - worker03.ocp.iad2.fedoraproject.org - worker04.ocp.iad2.fedoraproject.org - worker05.ocp.iad2.fedoraproject.org ...
Write and save the change.
-
From within the Openshift webconsole, or via cli search for all "LocalVolumeSet" objects.
There should really be only a single LocalVolumeSet object called
local-block
in theopenshift-local-storage
namespace/project.Edit this object:
oc edit localvolumeset local-block -n openshift-local-storage
Add the hostname for the new node to the list that is already there like:
... spec: ... nodeSelector: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - worker01.ocp.iad2.fedoraproject.org - worker02.ocp.iad2.fedoraproject.org - worker03.ocp.iad2.fedoraproject.org - worker04.ocp.iad2.fedoraproject.org - worker05.ocp.iad2.fedoraproject.org ...
Write and save the change.
-
Add the
cluster.ocs.openshift.io/openshift-storage
label to the new node:oc label no worker05.ocp.iad2.fedoraproject.org cluster.ocs.openshift.io/openshift-storage=''
-
From the Openshift Web console visit
Storage, OpenShift Data Foundation
, then in theStorage Systems
sub menu, click the 3 dot menu on the right beside theocs-storagecluster-storage
object. ChooseAdd Capacity
option. From the popup menu that appears, ensure that the storage classlocal-block
is selected in the list. Finally confirm with add.
For best results, only perform this step once, and after all nodes have been added to the cluster.
Want to help? Learn how to contribute to Fedora Docs ›