# The volumeMode can be either `Filesystem` or `Block` if you are creating Filesystem PVC it should be `Filesystem`, if you are creating Block PV you need to change it to `Block`
volumeMode: Filesystem
```
### RBD Volume Attributes in PV
Below table explains the list of volume attributes can be set when creating a
| clusterID | The is used by the CSI plugin to uniquely identify and use a Ceph cluster (this is the key in configmap created duing ceph-csi deployment) | Yes |
| pool | The pool name in which rbd image is created | Yes |
| staticVolume | Value must be set to `true` to mount and unmount static rbd PVC | yes |
| mounter | If set to `rbd-nbd`, use `rbd-nbd` on nodes that have `rbd-nbd` and `nbd` kernel modules to map rbd images | No |
**Note** ceph-csi does not supports rbd image deletion for static PV.
`persistentVolumeReclaimPolicy` in PV spec must be set to `Retain` to avoid PV
delete attempt in csi-provisioner.
```bash
[$] kubectl create -f fs-static-pv.yaml
persistentvolume/fs-static-pv created
```
### Create RBD static PVC
To create the rbd PVC you need to know the PV name which is created above
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fs-static-pvc
namespace: default
spec:
accessModes:
# ReadWriteMany is only supported for Block PVC
- ReadWriteOnce
resources:
requests:
storage: 1Gi
# The volumeMode can be either `Filesystem` or `Block` if you are creating Filesystem PVC it should be `Filesystem`, if you are creating Block PV you need to change it to `Block`
volumeMode: Filesystem
# volumeName should be same as PV name
volumeName: fs-static-pv
```
```bash
[$] kubectl create -f fs-static-pvc.yaml
persistentvolumeclaim/fs-static-pvc created
```
**Note** deleting PV and PVC doesnot deleted the backend rbd image, user need to
# volumeHandle can be anything, need not to be same
# as PV name or volume name. keeping same for brevity
volumeHandle: cephfs-static-pv
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
```
### Node stage secret ref in CephFS PV
For static CephFS PV to work, userID and userKey needs to be specified in the
secret. Static PV will not work with adminID and adminKey.
Format for the secret should be same as detailed [here](https://github.com/ceph/ceph-csi/blob/3e656769b71a3c43d95f6875ed4934c82a8046e7/examples/cephfs/secret.yaml#L7-L10).
### CephFS volume attributes in PV
Below table explains the list of volume attributes can be set when creating a
| clusterID | The is used by the CSI plugin to uniquely identify and use a Ceph cluster (this is the key in configmap created duing ceph-csi deployment) | Yes |
| fsName | CephFS filesystem name into which the subvolume should be created/present | Yes |
| staticVolume | Value must be set to `true` to mount and unmount static rbd PVC | Yes |
| rootPath | Actual path of the subvolume in ceph cluster, can be retrieved by issuing getpath command as described above | Yes |
**Note** ceph-csi does not supports CephFS subvolume deletion for static PV.
`persistentVolumeReclaimPolicy` in PV spec must be set to `Retain` to avoid PV
delete attempt in csi-provisioner.
```bash
[$] kubectl create -f cephfs-static-pv.yaml
persistentvolume/cephfs-static-pv created
```
### Create CephFS static PVC
To create the CephFS PVC you need to know the PV name which is created above
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cephfs-static-pvc
namespace: default
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
volumeMode: Filesystem
# volumeName should be same as PV name
volumeName: cephfs-static-pv
```
```bash
[$] kubectl create -f cephfs-static-pvc.yaml
persistentvolumeclaim/cephfs-static-pvc created
```
**Note** deleting PV and PVC doesnot deleted the backend CephFS subvolume,
user needs to manually delete the CephFS subvolume if required