Creating a PVC using ODF storage volume
Use your ODF storage for a scratch device in your DataStage pod.
About this task
Create a persistent volume claim (PVC) that is to be used in the DataStage engine pods, using the ODF storage volume instead of a local disc.
Procedure
- In the DataStage console, click the New volume button, and provide
the following information:
- In the Name space field, from the drop-down list, select the namespace where you installed DataStage services, for example cpd-instance.
- In the Volume name type a name, for example odf-scratch-pv.
- Optional: In the Description field, provide the description.
- In the Volume type, from the drop-down, select New PVC.
- In the Storage class, type ocs-storagecluster-cephfs.
- In the Size in GB field, select a size, for example 10.
- In the Mount path, type a path you want to use, for example odf.
- Write down the mount path and the PVC name for the later use and click Add and then Run.
- Log into your oc cluster and run the following command:
oc edit pxruntime -n ${PROJECT_CPD_INST_OPERANDS} ds-px-default - Add the following lines (shown below) under 'spec:' and ensure that the content has the
correct indentation, see the example below.
spec: additional_storage: - mount_path: /mnts/odf pvc_name: volumes-odf-scratch-pv-pvc - Save the config file.
- Run the following command:
oc get pxruntime -n ${PROJECT_CPD_INST_OPERANDS}and see if the status is completed. See the example below:Example: oc get pxruntime -n ds NAME VERSION RECONCILED STATUS AGE ds-px-default 5.2.0 5.2.0 Completed 6d13h - Run the following command to confirm that the mount path is created:
oc rsh -n ${PROJECT_CPD_INST_OPERANDS} {px-runtime pod} ls /mnts/odf
ODF volume validation.
- Create a DataStage flow that includes the Row Generator stage with a few rows.
- Add the Sequential file connector. In the input tab, add /mnts/odf/sample.txt.
- Save, compile and run the flow.
- Right click on the Sequential file and select Preview to see the file content from the ODF PVC.
- Go to Storage volum and select the volume that has been created in the previous task: ds::odf-scratch-pv.
- Go to the File browser tab and confirm that you can see the file sample.txt.