Creating NFS exports
NFS exports are created by creating a Persistent Volume Claim (PVC) against the
ocs-storagecluster-ceph-nfs
StorageClass.
NFS PVCs can be created either by using a YAML file or from the OpenShift Container Platform web console.
Create NFS PVC using a YAML file
Use the following example PVC, where <desired_name> specifies a name for
the PVC, for example,
my-nfs-export
.Note:
volumeMode: Block
will
not work for NFS volumes.apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: <desired_name>
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: ocs-storagecluster-ceph-nfs
The export is created once the PVC reaches
the Bound state.Create NFS PVCs from the OpenShift Container Platform web console
Ensure that you are logged into the OpenShift Container Platform web console and the NFS feature
is enabled for the storage cluster.
- From the OpenShift Web Console go to .
- Set the Project to
openshift-storage
. - Click Create PersistentVolumeClaim and fill in the form.
- Specify the Storage Class:
ocs-storagecluster-ceph-nfs
. - Specify the PVC Name. For example,
my-nfs-export
. - Select the required Access Mode.
- Specify a Size as per application requirement.
- Select Volume mode:
Filesystem
.Note:Block
mode is not supported for NFS PVCs. - Click Create and wait until the PVC is in a Bound status.
- Specify the Storage Class: