// Module included in the following assemblies:
//
// * registry/configuring_registry_storage/configuring-registry-storage-vsphere.adoc
//
// * registry/configuring_registry_storage/configuring-registry-storage-baremetal.adoc
//
// * registry/configuring_registry_storage/Configuring-the-registry-for-rhodf.adoc

:_mod-docs-content-type: PROCEDURE
[id="registry-configuring-registry-storage-rhodf-cephfs_{context}"]
= Configuring the Image Registry Operator to use CephFS storage with Red Hat OpenShift Data Foundation

[role="_abstract"]
{rh-storage-first} integrates multiple storage types that you can use with the {product-registry}:

* Ceph, a shared and distributed file system and on-premise object storage
* NooBaa, providing a Multicloud Object Gateway

Use the following procedure to configure the image registry to use CephFS storage.

[NOTE]
====
CephFS uses persistent volume claim (PVC) storage. It is not recommended to use PVCs for image registry storage if there are other options are available, such as Ceph RGW or Noobaa.
====

.Prerequisites

* You have access to the cluster as a user with the `cluster-admin` role.
* You have access to the {product-title} web console.
* You installed the `oc` CLI.
* You installed the link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/latest[{rh-storage} Operator] to provide object storage and CephFS file storage.


.Procedure

. Create a PVC to use the `cephfs` storage class. For example:
+
[source,terminal]
----
cat <<EOF | oc apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
 name: registry-storage-pvc
 namespace: openshift-image-registry
spec:
 accessModes:
 - ReadWriteMany
 resources:
   requests:
     storage: 100Gi
 storageClassName: ocs-storagecluster-cephfs
EOF
----

. Configure the image registry to use the CephFS file system storage by entering the following command:
+
[source,terminal]
----
$ oc patch config.image/cluster -p '{"spec":{"managementState":"Managed","replicas":2,"storage":{"managementState":"Unmanaged","pvc":{"claim":"registry-storage-pvc"}}}}' --type=merge
----
