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

  1. In the DataStage console, click the New volume button, and provide the following information:
    1. In the Name space field, from the drop-down list, select the namespace where you installed DataStage services, for example cpd-instance.
    2. In the Volume name type a name, for example odf-scratch-pv.
    3. Optional: In the Description field, provide the description.
    4. In the Volume type, from the drop-down, select New PVC.
    5. In the Storage class, type ocs-storagecluster-cephfs.
    6. In the Size in GB field, select a size, for example 10.
    7. In the Mount path, type a path you want to use, for example odf.
  2. Write down the mount path and the PVC name for the later use and click Add and then Run.
  3. Log into your oc cluster and run the following command:
    oc edit pxruntime -n ${PROJECT_CPD_INST_OPERANDS} ds-px-default
  4. 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
  5. Save the config file.
  6. 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    
  7. 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.

  1. Create a DataStage flow that includes the Row Generator stage with a few rows.
  2. Add the Sequential file connector. In the input tab, add /mnts/odf/sample.txt.
  3. Save, compile and run the flow.
  4. Right click on the Sequential file and select Preview to see the file content from the ODF PVC.
  5. Go to Storage volum and select the volume that has been created in the previous task: ds::odf-scratch-pv.
  6. Go to the File browser tab and confirm that you can see the file sample.txt.