Configuration: Storage-admin tasks

Contributors ac-ntap netapp-dorianh Download PDF of this page

The following resources must be configured by a storage administrator:

  1. Log into the NetApp ONTAP cluster as admin.

  2. Navigate to Storage → Storage VMs and click Add. Create two SVMs, one for project-1 and the other for project-2, providing the required details. Also create an vsadmin account to manage the SVM and its resources.

SVM creation on ONTAP
  1. Login to the Red Hat OpenShift cluster as the storage administrator.

  2. Create the backend for project-1 and map it to the SVM dedicated to the project. NetApp recommends using the SVM’s vsadmin account to connect the backend to SVM instead of using the ONTAP cluster administrator.

    cat << EOF | tridentctl -n trident create backend -f
    {
        "version": 1,
        "storageDriverName": "ontap-nas",
        "backendName": "nfs_project_1",
        "managementLIF": "172.21.224.210",
        "dataLIF": "10.61.181.224",
        "svm": "project-1-svm",
        "username": "vsadmin",
        "password": "NetApp123"
    }
    EOF
We are using the ontap-nas driver for this example. Use the appropriate driver when creating the backend based on the use-case.
We assume that Trident is installed in trident project.
  1. Similarly create the Trident backend for project-2 and map it to the SVM dedicated to project-2.

  2. Next, create the storage classes. Create the storage class for project-1 and configure it to use the storage pools from backend dedicated to project-1 by setting the storagePools parameter.

    cat << EOF | oc create -f -
    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: project-1-sc
    provisioner: csi.trident.netapp.io
    parameters:
      backendType: ontap-nas
      storagePools: "nfs_project_1:.*"
    EOF
  3. Likewise, create a storage class for project-2 and configure it to use the storage pools from backend dedicated to project-2.

  4. Create a ResourceQuota to restrict resources in project-1 requesting storage from storageclasses dedicated to other projects.

    cat << EOF | oc create -f -
    kind: ResourceQuota
    apiVersion: v1
    metadata:
      name: project-1-sc-rq
      namespace: project-1
    spec:
      hard:
        project-2-sc.storageclass.storage.k8s.io/persistentvolumeclaims: 0
    EOF
  5. Similarly, create a ResourceQuota to restrict resources in project-2 requesting storage from storageclasses dedicated to other projects.