Chapter 2. Deploy OpenShift Data Foundation using local storage devices
Deploying OpenShift Data Foundation on Red Hat OpenShift using local storage devices provides you with the option to create internal cluster resources. Follow this deployment method to use local storage to back persistent volumes for your Red Hat OpenShift applications.
Use this section to deploy OpenShift Data Foundation on IBM Z infrastructure where Red Hat OpenShift is already installed.
2.1. Installing Red Hat OpenShift Data Foundation Operator Copy linkLink copied to clipboard!
You can install Red Hat OpenShift Data Foundation Operator using the Red Hat OpenShift Container Platform Operator Hub.
Prerequisites
-
Access to an OpenShift Container Platform cluster using an account with
cluster-adminand operator installation permissions. - You must have at least three worker or infrastructure nodes in the Red Hat OpenShift Container Platform cluster.
- For additional resource requirements, see the Planning your deployment guide.
When you need to override the cluster-wide default node selector for OpenShift Data Foundation, you can use the following command to specify a blank node selector for the
openshift-storagenamespace (createopenshift-storagenamespace in this case):oc annotate namespace openshift-storage openshift.io/node-selector=
$ oc annotate namespace openshift-storage openshift.io/node-selector=Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Taint a node as
infrato ensure only Red Hat OpenShift Data Foundation resources are scheduled on that node. This helps you save on subscription costs. For more information, see the How to use dedicated worker nodes for Red Hat OpenShift Data Foundation section in the Managing and Allocating Storage Resources guide.
Procedure
- Log in to the OpenShift Web Console.
-
Click Operators
OperatorHub. -
Scroll or type
OpenShift Data Foundationinto the Filter by keyword box to find the OpenShift Data Foundation Operator. - Click Install.
Set the following options on the Install Operator page:
- Update Channel as stable-4.18.
- Installation Mode as A specific namespace on the cluster.
-
Installed Namespace as Operator recommended namespace openshift-storage. If Namespace
openshift-storagedoes not exist, it is created during the operator installation. Select Approval Strategy as Automatic or Manual.
If you select Automatic updates, then the Operator Lifecycle Manager (OLM) automatically upgrades the running instance of your Operator without any intervention.
If you select Manual updates, then the OLM creates an update request. As a cluster administrator, you must then manually approve that update request to update the Operator to a newer version.
- Ensure that the Enable option is selected for the Console plugin.
- Click Install.
Verification steps
-
After the operator is successfully installed, a pop-up with a message,
Web console update is availableappears on the user interface. Click Refresh web console from this pop-up for the console changes to reflect. In the Web Console:
- Navigate to Installed Operators and verify that the OpenShift Data Foundation Operator shows a green tick indicating successful installation.
- Navigate to Storage and verify if the Data Foundation dashboard is available.
2.2. Installing Local Storage Operator Copy linkLink copied to clipboard!
Install the Local Storage Operator from the Operator Hub before creating Red Hat OpenShift Data Foundation clusters on local storage devices.
Procedure
- Log in to the OpenShift Web Console.
-
Click Operators
OperatorHub. -
Type
local storagein the Filter by keyword box to find the Local Storage Operator from the list of operators, and click on it. Set the following options on the Install Operator page:
-
Update channel as
stable. - Installation mode as A specific namespace on the cluster.
- Installed Namespace as Operator recommended namespace openshift-local-storage.
- Update approval as Automatic.
-
Update channel as
- Click Install.
Verification steps
- Verify that the Local Storage Operator shows a green tick indicating successful installation.
2.3. Finding available storage devices (optional) Copy linkLink copied to clipboard!
This step is additional information and can be skipped as the disks are automatically discovered during storage cluster creation. Use this procedure to identify the device names for each of the three or more worker nodes that you have labeled with the OpenShift Data Foundation label cluster.ocs.openshift.io/openshift-storage='' before creating Persistent Volumes (PV) for IBM Z.
Procedure
List and verify the name of the worker nodes with the OpenShift Data Foundation label.
oc get nodes -l=cluster.ocs.openshift.io/openshift-storage=
$ oc get nodes -l=cluster.ocs.openshift.io/openshift-storage=Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
NAME STATUS ROLES AGE VERSION bmworker01 Ready worker 6h45m v1.16.2 bmworker02 Ready worker 6h45m v1.16.2 bmworker03 Ready worker 6h45m v1.16.2
NAME STATUS ROLES AGE VERSION bmworker01 Ready worker 6h45m v1.16.2 bmworker02 Ready worker 6h45m v1.16.2 bmworker03 Ready worker 6h45m v1.16.2Copy to Clipboard Copied! Toggle word wrap Toggle overflow Log in to each worker node that is used for OpenShift Data Foundation resources and find the unique
by-iddevice name for each available raw block device.oc debug node/<node name>
$ oc debug node/<node name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this example, for
bmworker01, the available local device issdb.Identify the unique ID for each of the devices selected in Step 2.
sh-4.4#ls -l /dev/disk/by-id/ | grep sdb lrwxrwxrwx. 1 root root 9 Feb 3 16:49 scsi-360050763808104bc2800000000000259 -> ../../sdb lrwxrwxrwx. 1 root root 9 Feb 3 16:49 scsi-SIBM_2145_00e020412f0aXX00 -> ../../sdb lrwxrwxrwx. 1 root root 9 Feb 3 16:49 scsi-0x60050763808104bc2800000000000259 -> ../../sdb
sh-4.4#ls -l /dev/disk/by-id/ | grep sdb lrwxrwxrwx. 1 root root 9 Feb 3 16:49 scsi-360050763808104bc2800000000000259 -> ../../sdb lrwxrwxrwx. 1 root root 9 Feb 3 16:49 scsi-SIBM_2145_00e020412f0aXX00 -> ../../sdb lrwxrwxrwx. 1 root root 9 Feb 3 16:49 scsi-0x60050763808104bc2800000000000259 -> ../../sdbCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the above example, the ID for the local device
sdbscsi-0x60050763808104bc2800000000000259
scsi-0x60050763808104bc2800000000000259Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Repeat the above step to identify the device ID for all the other nodes that have the storage devices to be used by OpenShift Data Foundation. See this Knowledge Base article for more details.
2.4. Managing disks in a KVM environment Copy linkLink copied to clipboard!
Use this procedure to manage disks for KVM guests, including adding disks and configuring device properties for OpenShift Data Foundation compatibility.
Procedure
To add a disk to a KVM guest, run the following command:
virsh attach-disk <guest-name> --source <disk-path> --target vdc --persistent --serial <unique-serial-value>
virsh attach-disk <guest-name> --source <disk-path> --target vdc --persistent --serial <unique-serial-value>Copy to Clipboard Copied! Toggle word wrap Toggle overflow where:
--persistent- Specifies that the configuration survives guest restarts.
--serial- Specifies that device identifiers remain constistent across restarts.
<unique-serial-value>- Specifies a unique serial value that is assigned to the disk.
When solid state drives (SSD) are passed through to a KVM guest, the guest might incorrectly set the rotational flag to 1, for hard disk drive (HDD). You must manually set the rotational flag to 0 so ODF can detect and use the device. To verify the current rotational flag, run the following command:
lsblk -o NAME,ROTA
lsblk -o NAME,ROTACopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To manually set the rotational flag, follow the steps described in How to override device rotational flags in ODF/FDF environments (IBM documentation).
2.5. Enabling DASD devices Copy linkLink copied to clipboard!
If you are using DASD devices, you must enable them before creating an OpenShift Data Foundation cluster on IBM Z. Once the DASD devices are available to z/VM guests, complete the following steps from the compute or infrastructure node on which an OpenShift Data Foundation storage node is being installed.
Procedure
To enable the DASD device, run the following command:
sudo chzdev -e <device_bus_id>
sudo chzdev -e <device_bus_id>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- For <device_bus_id>, specify the ID of the DASD device bus-ID. For example,
0.0.b100.
To verify the status of the DASD device you can use the the
lsdasdandlsblkcommands.To low-level format the device and specify the disk name, run the following command:
sudo dasdfmt /dev/<device_name> -b 4096 -p --mode=full
sudo dasdfmt /dev/<device_name> -b 4096 -p --mode=full1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- For <device_name>, specify the disk name. For example,
dasdb.
ImportantThe use of DASD quick-formatting Extent Space Efficient (ESE) DASD is not supported on OpenShift Data Foundation. If you are using ESE DASDs, make sure to disable quick-formatting with the
--mode=fullparameter.To auto-create one partition using the whole disk, run the following command:
sudo fdasd -a /dev/<device_name>
sudo fdasd -a /dev/<device_name>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- For <device_name>, enter the disk name you have specified in the previous step. For example,
dasdb.
Once these steps are completed, the device is available during OpenShift Data Foundation deployment as /dev/dasdb1.
During LocalVolumeSet creation, make sure to select only the Part option as device type.
Additional resources
- For details on the commands, see Commands for Linux on IBM Z in IBM documentation.
2.6. Creating OpenShift Data Foundation cluster on IBM Z Copy linkLink copied to clipboard!
Use this procedure to create an OpenShift Data Foundation cluster on IBM Z.
Prerequisites
- Ensure that all the requirements in the Requirements for installing OpenShift Data Foundation using local storage devices section are met.
- You must have at least three worker nodes with the same storage type and size attached to each node (for example, 200 GB) to use local storage devices on IBM Z or IBM® LinuxONE.
Procedure
In the OpenShift Web Console, click Operators
Installed Operators to view all the installed operators. Ensure that the Project selected is
openshift-storage.- Click on the OpenShift Data Foundation operator and then click Create StorageSystem.
In the Backing storage page, perform the following:
- Select the Create a new StorageClass using the local storage devices for Backing storage type option.
- Select Full Deployment for the Deployment type option.
Click Next.
ImportantYou are prompted to install the Local Storage Operator if it is not already installed. Click Install, and follow the procedure as described in Installing Local Storage Operator.
In the Create local volume set page, provide the following information:
Enter a name for the LocalVolumeSet and the StorageClass.
By default, the local volume set name appears for the storage class name. You can change the name.
Choose one of the following:
Disks on all nodes
Uses the available disks that match the selected filters on all the nodes.
Disks on selected nodes
Uses the available disks that match the selected filters only on the selected nodes.
ImportantThe flexible scaling feature is enabled only when the storage cluster that you created with three or more nodes are spread across fewer than the minimum requirement of three availability zones.
For information about flexible scaling, see knowledgebase article on Scaling OpenShift Data Foundation cluster using YAML when flexible scaling is enabled.
- Flexible scaling features get enabled at the time of deployment and can not be enabled or disabled later on.
If the nodes selected do not match the OpenShift Data Foundation cluster requirement of an aggregated 30 CPUs and 72 GiB of RAM, a minimal cluster is deployed.
For minimum starting node requirements, see the Resource requirements section in the Planning guide.
-
From the available list of Disk Type, select
SSD/NVME. Expand the Advanced section and set the following options:
Volume Mode
Block is selected by default.
Device Type
Select one or more device type from the dropdown list. By default,
DiskandPartoptions are included in the Device Type field.Note-
For a multi-path device, select the
Mpathoption from the drop-down exclusively. -
For a DASD-based cluster, ensure that only the
Partoption is included in the Device Type and remove theDiskoption.
Disk Size
Set a minimum size of 100GB for the device and maximum available size of the device that needs to be included.
Maximum Disks Limit
This indicates the maximum number of PVs that can be created on a node. If this field is left empty, then PVs are created for all the available disks on the matching nodes.
-
For a multi-path device, select the
Click Next.
A pop-up to confirm the creation of LocalVolumeSet is displayed.
- Click Yes to continue.
In the Capacity and nodes page, configure the following:
- Available raw capacity is populated with the capacity value based on all the attached disks associated with the storage class. This takes some time to show up. The Selected nodes list shows the nodes based on the storage class.
- You can check the box to select Taint nodes.
- Click Next.
Optional: In the Security and network page, configure the following based on your requirement:
- To enable encryption, select Enable data encryption for block and file storage.
Choose one or both of the following Encryption level:
Cluster-wide encryption
Encrypts the entire cluster (block and file).
StorageClass encryption
Creates encrypted persistent volume (block only) using encryption enabled storage class.
Select Connect to an external key management service checkbox. This is optional for cluster-wide encryption.
-
Key Management Service Provider is set to
Vaultby default. - Enter Vault Service Name, host Address of Vault server ('https://<hostname or ip>''), Port number and Token.
Expand Advanced Settings to enter additional settings and certificate details based on your Vault configuration:
- Enter the Key Value secret path in Backend Path that is dedicated and unique to OpenShift Data Foundation.
- Optional: Enter TLS Server Name and Vault Enterprise Namespace.
- Upload the respective PEM encoded certificate file to provide CA Certificate, Client Certificate and Client Private Key.
- Click Save.
-
Key Management Service Provider is set to
- Select Default (SDN) as Multus is not yet supported on OpenShift Data Foundation on IBM Z.
- Click Next.
In the Review and create page::
- Review the configuration details. To modify any configuration settings, click Back to go back to the previous configuration page.
- Click Create StorageSystem.
Verification steps
To verify the final Status of the installed storage cluster:
-
In the OpenShift Web Console, navigate to Installed Operators
OpenShift Data Foundation Storage System ocs-storagecluster-storagesystem Resources. -
Verify that
StatusofStorageClusterisReadyand has a green tick mark next to it.
-
In the OpenShift Web Console, navigate to Installed Operators
To verify if flexible scaling is enabled on your storage cluster, perform the following steps:
-
In the OpenShift Web Console, navigate to Installed Operators
OpenShift Data Foundation Storage System ocs-storagecluster-storagesystem Resources ocs-storagecluster. In the YAML tab, search for the keys
flexibleScalinginspecsection andfailureDomaininstatussection. Ifflexible scalingis true andfailureDomainis set to host, flexible scaling feature is enabled.spec: flexibleScaling: true […] status: failureDomain: host
spec: flexibleScaling: true […] status: failureDomain: hostCopy to Clipboard Copied! Toggle word wrap Toggle overflow
-
In the OpenShift Web Console, navigate to Installed Operators
- To verify that all components for OpenShift Data Foundation are successfully installed, see Verifying your OpenShift Data Foundation deployment.
Additional resources
- To expand the capacity of the initial cluster, see the Scaling Storage guide.