Chapter 4. Scaling storage nodes
To scale the storage capacity of OpenShift Container Storage, you can do either of the following:
- Scale up storage nodes - Add storage capacity to the existing Red Hat OpenShift Container Storage worker nodes
- Scale out storage nodes - Add new worker nodes containing storage capacity
4.1. Requirements for scaling storage nodes Copy linkLink copied to clipboard!
Before you proceed to scale the storage nodes, refer to the following sections to understand the node requirements for your specific Red Hat OpenShift Container Storage instance:
- Supported Infrastructure and Platforms
Supported configurations
Always ensure that you have plenty of storage capacity.
If storage ever fills completely, it is not possible to add capacity or delete or migrate content away from the storage to free up space. Completely full storage is very difficult to recover.
Capacity alerts are issued when cluster storage capacity reaches 75% (near-full) and 85% (full) of total capacity. Always address capacity warnings promptly, and review your storage regularly to ensure that you do not run out of storage space.
If you do run out of storage space completely, contact Red Hat Customer Support.
4.1.1. Supported Deployments for Red Hat OpenShift Container Storage Copy linkLink copied to clipboard!
User-provisioned infrastructure:
- Amazon Web Services (AWS)
- VMware
- Bare metal (Technology Preview)
Installer-provisioned infrastructure:
- Amazon Web Services (AWS)
4.2. Scaling up storage capacity Copy linkLink copied to clipboard!
Depending on the type of your deployment, you can choose one of the following procedures to scale up storage capacity.
- For AWS or VMware infrastructures using dynamic or automated provisioning of storage devices, see Section 4.2.1, “Scaling up storage by adding capacity to your OpenShift Container Storage nodes on AWS or VMware infrastructure”
- For bare metal, Amazon EC2 (storage optimized - i3en.2xlarge), or VMware infrastructures using local sotrage devices, see Section 4.2.2, “Scaling up storage by adding capacity to your OpenShift Container Storage nodes using local storage devices”
4.2.1. Scaling up storage by adding capacity to your OpenShift Container Storage nodes on AWS or VMware infrastructure Copy linkLink copied to clipboard!
Use this procedure to add storage capacity and performance to your configured Red Hat OpenShift Container Storage worker nodes.
Prerequisites
- A running OpenShift Container Storage Platform
- Administrative privileges on the OpenShift Web Console
Procedure
- Navigate to the OpenShift Web Console.
-
Click on
Operatorson the left navigation bar. -
Select
Installed Operators. In the window, click
OpenShift Container Storage Operator:
In the top navigation bar, scroll right and click
Storage Clustertab.
- The visible list should have only one item. Click (⋮) on the far right to extend the options menu.
Select
Add Capacityfrom the options menu.
From this dialog box, you can set the requested additional capacity and the storage class.
Add capacitywill show the capacity selected at the time of installation and will allow to add the capacity only in this increment. On AWS, the storage class should be set togp2. On VMWare, the storage class should be set tothin.NoteThe effectively provisioned capacity will be three times as much as you put into the
Requested Capacityfield because OpenShift Container Storage uses a replica count of 3.-
Once you are done with your setting, click
Add. You will not see the status of the storage cluster until it reachesReady. You might need to wait a couple of minutes after you see theReadystate.
Verification steps
Navigate to Dashboards
OCS PV tab, then check the Capacity breakdown card.
- Note that the capacity increases based on your selections.
As of OpenShift Container Storage 4.2, cluster reduction, whether by reducing OSDs or nodes, is not supported.
4.2.2. Scaling up storage by adding capacity to your OpenShift Container Storage nodes using local storage devices Copy linkLink copied to clipboard!
Use this procedure to add storage capacity (additional storage devices) to your configured local storage based OpenShift Container Storage worker nodes on bare metal, Amazon EC2 (storage optimized - i3en.2xlarge), and VMware infrastructures.
Scaling up storage on bare metal, Amazon EC2 (storage optimized - i3en.2xlarge), and VMware is a Technology Preview feature. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For Amazon EC2 (storage optimized - i3en.2xlarge) infrastructure, adding nodes is the only option for adding capacity, as deployment is done using both the available NVMe devices.
Prerequisites
- You must be logged into OpenShift Container Platform (OCP) cluster.
- You must have installed local storage operator. For information, see Installing Local Storage Operator.
- You must have three OpenShift Container Platform worker nodes with the same storage type and size attached to each node (for example, 2TB NVMe drive) as the original OCS StorageCluster was created with.
Procedure
To add storage capacity to OpenShift Container Platform nodes with OpenShift Container Storage installed, you need to find the unique
by-ididentifier for available devices that you want to add, that is, a minimum of one device per worker node. For more details, see Finding available storage devices.NoteMake sure you perform this process for all the existing nodes (minimum of 3) for which you want to add storage.
Example of
LocalVolumeCRlocal-storage-block-expand.yamlusing OpenShift Storage Container label as node selector andby-iddevice identifier:apiVersion: local.storage.openshift.io/v1 kind: LocalVolume metadata: name: local-block namespace: local-storage spec: nodeSelector: nodeSelectorTerms: - matchExpressions: - key: cluster.ocs.openshift.io/openshift-storage operator: In values: - "" storageClassDevices: - storageClassName: localblock volumeMode: Block devicePaths: - /dev/disk/by-id/nvme-Amazon_EC2_NVMe_Instance_Storage_AWS10382E5D7441494EC # <-- modify this line - /dev/disk/by-id/nvme-Amazon_EC2_NVMe_Instance_Storage_AWS60382E5D7441494EC # <-- modify this line - /dev/disk/by-id/nvme-Amazon_EC2_NVMe_Instance_Storage_AWS1F45C01D7E84FE3E9 # <-- modify this line - /dev/disk/by-id/nvme-Amazon_EC2_NVMe_Instance_Storage_AWS6F45C01D7E84FE3E9 # <-- modify this line - /dev/disk/by-id/nvme-Amazon_EC2_NVMe_Instance_Storage_AWS136BC945B4ECB9AE4 # <-- modify this line - /dev/disk/by-id/nvme-Amazon_EC2_NVMe_Instance_Storage_AWS636BC945B4ECB9AE4 # <-- modify this lineYou can see that in this CR new devices using
by-idhave been added. Each device maps tonvme1n1on one of the three worker nodes.-
nvme-Amazon_EC2_NVMe_Instance_Storage_AWS60382E5D7441494EC -
nvme-Amazon_EC2_NVMe_Instance_Storage_AWS6F45C01D7E84FE3E9 -
nvme-Amazon_EC2_NVMe_Instance_Storage_AWS636BC945B4ECB9AE4
-
Create the
LocalVolumeCR.$ oc apply -f local-storage-block-expand.yamlExample output:
localvolume.local.storage.openshift.io/local-block configuredDisplay PVs with
localblock.$ oc get pvExample output:
local-pv-1d63db9e 1769Gi RWO Delete Available localblock 33s local-pv-1eb9da0a 1769Gi RWO Delete Available localblock 25s local-pv-31021a83 1769Gi RWO Delete Available localblock 48s ...There are three more available PVs that you need to add to the
StorageCluster.To expand storage capacity, modify the
countforStorageDeviceSetsfrom1to2.Example of
StorageClusterCRcluster-service-AWS-expand.yamlusingmonDataDirHostPathandlocalblockStorageClass:apiVersion: ocs.openshift.io/v1 kind: StorageCluster metadata: name: ocs-storagecluster namespace: openshift-storage spec: manageNodes: false monDataDirHostPath: /var/lib/rook storageDeviceSets: - count: 2 # <-- modify count to 2 dataPVCTemplate: spec: accessModes: - ReadWriteOnce resources: requests: storage: 1 storageClassName: localblock volumeMode: Block name: ocs-deviceset placement: {} portable: false replica: 3 resources: {}ImportantTo ensure that the OSDs have a guaranteed size across the nodes, the storage size for
storageDeviceSetsmust be specified as less than or equal to the size of the desired PVs created on the nodes.Create the
StorageClusterCR.$ oc apply -f cluster-service-AWS-expand.yamlExample output:
storagecluster.ocs.openshift.io/ocs-storagecluster configuredDisplay pods. You must now have three more OSD pods (osd-3, osd-4, and osd-5) and three more
osd-preparepods.$ oc get pods -n openshift-storage | grep 'ceph-osd'Example output:
rook-ceph-osd-3-568d8797b6-j5xqx 1/1 Running 0 14m rook-ceph-osd-4-cc4747fdf-5glgl 1/1 Running 0 14m rook-ceph-osd-5-94c46bbcc-tb7pw 1/1 Running 0 14m ... rook-ceph-osd-prepare-ocs-deviceset-0-1-mcmlv-qmn4r 0/1 Completed 0 14m rook-ceph-osd-prepare-ocs-deviceset-1-1-tjh2d-fl5zc 0/1 Completed 0 14m rook-ceph-osd-prepare-ocs-deviceset-2-1-nqlkg-x9wdn 0/1 Completed 0 14m
Verification steps
See Verifying your OpenShift Container Storage installation.
4.3. Scaling out storage capacity Copy linkLink copied to clipboard!
To scale out storage capacity, you need to perform the following steps:
- Add a new node
- Verify that the new node is added successfully
- Scale up the storage capacity
4.3.1. Adding a node Copy linkLink copied to clipboard!
You can add nodes to increase the storage capacity when existing worker nodes are already running at their maximum supported OSDs, which is increment of 3 OSDs of the capacity selected during initial configuration.
Depending on the type of your deployment, you can choose one of the following procedures to add a storage node:
- For AWS installer-provisioned infrastructure, see Section 4.3.1.1, “Adding a node on an AWS installer-provisioned infrastructure”
- For AWS or VMware user-provisioned infrastructure, see Section 4.3.1.2, “Adding a node on an AWS or a VMware user-provisioned infrastructure”
- For bare metal, Amazon EC2, or VMware infrastructures, see Section 4.3.1.3, “Adding a node using a local storage device”
4.3.1.1. Adding a node on an AWS installer-provisioned infrastructure Copy linkLink copied to clipboard!
Prerequisites
- You must be logged into OpenShift Container Platform (OCP) cluster.
Procedure
-
Navigate to Compute
Machine Sets. - On the machine set where you want to add nodes, select Edit Count.
- Add the amount of nodes, and click Save.
-
Click Compute
Nodes and confirm if the new node is in Ready state. Apply the OpenShift Container Storage label to the new node.
-
For the new node, Action menu (⋮)
Edit Labels. - Add cluster.ocs.openshift.io/openshift-storage='' and click Save.
-
For the new node, Action menu (⋮)
It is recommended to add 3 nodes each in different zones. You must add 3 nodes and perform this procedure for all of them.
Verification steps
To verify that the new node is added, see Section 4.3.2, “Verifying the addition of a new node”.
4.3.1.2. Adding a node on an AWS or a VMware user-provisioned infrastructure Copy linkLink copied to clipboard!
Prerequisites
- You must be logged into OpenShift Container Platform (OCP) cluster.
Procedure
Depending on whether you are adding a node on an AWS user provisioned infrastructure or a VMware user-provisioned infrastructure, perform the following steps:
For AWS
- Create a new AWS machine instance with the required infrastructure. See Supported Infrastructure and Platforms.
- Create a new OpenShift Container Platform node using the new AWS machine instance.
For VMware:
- Create a new VM on vSphere with the required infrastructure. See Supported Infrastructure and Platforms.
- Create a new OpenShift Container Platform worker node using the new VM.
Check for certificate signing requests (CSRs) related to OpenShift Container Storage that are in
Pendingstate:$ oc get csrApprove all required OpenShift Container Storage CSRs for the new node:
$ oc adm certificate approve <Certificate_Name>-
Click Compute
Nodes, confirm if the new node is in Ready state. Apply the OpenShift Container Storage label to the new node using any one of the following:
- From User interface
-
For the new node, click Action Menu (⋮)
Edit Labels -
Add
cluster.ocs.openshift.io/openshift-storageand click Save.
-
For the new node, click Action Menu (⋮)
- From Command line interface
Execute the following command to apply the OpenShift Container Storage label to the new node:
$ oc label node <new_node_name> cluster.ocs.openshift.io/openshift-storage=""NoteIt is recommended to add 3 nodes each in different zones. You must add 3 nodes and perform this procedure for all of them.
Verification steps
To verify that the new node is added, see Section 4.3.2, “Verifying the addition of a new node”.
4.3.1.3. Adding a node using a local storage device Copy linkLink copied to clipboard!
Use this procedure to add a node on bare metal, Amazon EC2 (storage optimized - i3en.2xlarge), and VMware infrastructures.
Scaling storage nodes for bare metal, Amazon EC2, and VMware is a Technology Preview feature. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
Prerequisites
- You must be logged into OpenShift Container Platform (OCP) cluster.
- You must have three OpenShift Container Platform worker nodes with the same storage type and size attached to each node (for example, 2TB NVMe drive) as the original OCS StorageCluster was created with.
Procedure
Depending on whether you are adding a node on bare metal, Amazon EC2 (storage optimized - i3en.2xlarge), or VMware infrastructure, perform the following steps:
For AWS
- Create a new AWS machine instance with the required infrastructure. See Supported Infrastructure and Platforms.
- Create a new OpenShift Container Platform node using the new AWS machine instance.
For VMware:
- Create a new VM on vSphere with the required infrastructure. See Supported Infrastructure and Platforms.
- Create a new OpenShift Container Platform worker node using the new VM.
For bare metal:
- Get a new bare metal machine with the required infrastructure. See Supported Infrastructure and Platforms.
- Create a new OpenShift Container Platform node using the new bare metal machine.
Check for certificate signing requests (CSRs) related to OpenShift Container Storage that are in
Pendingstate:$ oc get csrApprove all required OpenShift Container Storage CSRs for the new node:
$ oc adm certificate approve <Certificate_Name>-
Click Compute
Nodes, confirm if the new node is in Ready state. Apply the OpenShift Container Storage label to the new node using any one of the following:
- From User interface
-
For the new node, click Action Menu (⋮)
Edit Labels -
Add
cluster.ocs.openshift.io/openshift-storageand click Save.
-
For the new node, click Action Menu (⋮)
- From Command line interface
Execute the following command to apply the OpenShift Container Storage label to the new node:
$ oc label node <new_node_name> cluster.ocs.openshift.io/openshift-storage=""NoteIt is recommended to add 3 nodes each in different zones. You must add 3 nodes and perform this procedure for all of them.
Verification steps
To verify that the new node is added, see Section 4.3.2, “Verifying the addition of a new node”.
4.3.2. Verifying the addition of a new node Copy linkLink copied to clipboard!
Execute the following command and verify that the new node is present in the output:
$ oc get nodes --show-labels | grep cluster.ocs.openshift.io/openshift-storage= |cut -d' ' -f1Click Workloads
Pods, confirm that at least the following pods on the new node are in Running state: -
csi-cephfsplugin-* -
csi-rbdplugin-*
-
Verify the health of OpenShift Container Storage cluster using the persistent storage dashboard:
-
Click Home
Dashboards from the left pane of the OpenShift Web Console and click the OCS PV tab. - In the Status card, verify that the cluster health displays a green tick icon.
-
Click Home
4.3.3. Scaling up storage capacity Copy linkLink copied to clipboard!
To scale up storage capacity, see Scaling up storage by adding capacity.