Setting up an NFS mount in DataStage
You can set up an NFS mount in DataStage® pods by using a PersistentVolume (PV).
With DataStage, you can use a Network File System (NFS) mount to pass data files such as CSV and XML between DataStage and source or target systems. For DataStage in Cloud Pak for Data, you can set up an NFS mount in DataStage pods by using a PV. You can also set up supplemental groups to configure access control for the NFS mount.
- Log in to the
cluster:
oc login <OpenShift_URL>:port
- Create a PersistentVolumeClaim (PVC).
- Create the PV:
cat <<EOF |oc apply -f - apiVersion: v1 kind: PersistentVolume metadata: name: sample-nfs-pv spec: capacity: storage: 100Gi accessModes: - ReadWriteMany nfs: path: /data/sample-pv # all worker nodes on the cluster should be allowed server: <NFS server IP> # to mount the path specified on the NFS server persistentVolumeReclaimPolicy: Retain EOF
- Create the PVC:
cat <<EOF |oc apply -f - apiVersion: v1 kind: PersistentVolumeClaim metadata: name: sample-nfs-pvc spec: accessModes: - ReadWriteMany resources: requests: storage: 100Gi volumeName: sample-nfs-pv EOF
- Create the PV:
- Add the PVC to the PX runtime custom resource (CR) under
additional_storage
:spec: additional_storage: # mount additional persistent volumes - mount_path: /data1 # the path to mount the persistent volume pvc_name: <pvc-1-name> # the name of the associated persistent volume claim - mount_path: /data2 pvc_name: <pvc-2-name> description: The default DataStage runtime instance license: accept: true parameters: scaleConfig: small storageClass: nfs-client storageSize: 10Gi supplementalGroup: 6666,5555 #comma separated list of groupID if required to access nfs mount
If the mounted PVC requires a specific group ID to access,
supplementalGroup
underparameters
can be used to specify one or more group IDs. The supplementalGroup parameter corresponds to the group ID that is required to access resources on the NFS mount. The same PVC can be mounted by multiple DataStage runtime instances with different sets of supplemental group IDs to control what each instance can access.You can also create and mount storage volumes by using the UI in IBM® Cloud Pak for Data. For more information, see Managing storage volumes.