Configuring database storage (MongoDB)
You must use the appropriate type of storage for your integrated database. You can configure the storage before you create the database deployment, or when you create the database deployment.
About this task
MongoDB requires a local persistent volume or dynamic storage class for your user data (the main database data) and dynamic provisioning for the data that is used by MongoDB Ops Manager to manage and configure the database. An NFS persistent volume can also used for metadata.
- Dynamic storage provisioning
-
Dynamic provisioning enables storage volumes to be created on-demand. To do so, your cluster administrator needs to create one or more StorageClass objects. MongoDB supports storage classes for the following storage types:
- Portworx (required storage class: portworx-db-gp). For information on the storage class definition, see Creating Portworx storage classes.
- Red Hat® OpenShift® Container Storage (required storage class: ocs-storagecluster-rbd)
- NFS
If you use a dynamic storage class, for example
managed-nfs-storage, persistent volumes are automatically created as needed. You can use a dynamic storage class for both Ops Manager (system) data storage and for user data. The following example shows the contents of the storage class YAML file for themanaged-nfs-storagestorage class:apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: managed-nfs-storage provisioner: fuseim.pri/ifs mountOptions: - v4.2 - context="system_u:object_r:container_file_t:s0" parameters: archiveOnDelete: "false" reclaimPolicy: RetainSee Dynamic Volume Provisioning in the Kubernetes documentation for more information.