This section provides steps to configure the local storage operator available from OperatorHub to use for a lab environment. Local storage is not recommended in production.
To use local storage, you will need a RHEL compute node in the cluster. Refer to the following documentation to add a RHEL compute node.
On the RHEL compute node, create a new device path. For this example, we will use /dev/sdb1
for the second partition. Add the partition by running fdisk /dev/sdb1
.
Refer to the following for documentation to configure local persistent storage. This example provisions the following StorageClass objects:
- StorageClass named
local-storageclass
using Filesystem storage on the/dev/sdb1
device path. Replace the node nameworker1.yourcluster.domain.com
with your own. Create the LocalVolume object with the following:oc apply -f local-volume.yaml
- StorageClass named
localblock-storageclass
using Block storage on the/dev/sdb2
device path. Replace the node nameworker1.yourcluster.domain.com
with your own. Create the LocalVolume object with the following:oc apply -f localblock-volume.yaml