NetApp ONTAP iSCSI configuration
-
PDF of this doc site
- Artificial Intelligence
- Public and Hybrid Cloud
- Virtualization
-
Containers
- Red Hat OpenShift with NetApp
Collection of separate PDF docs
Creating your file...
To enable Trident integration with the NetApp ONTAP storage system, you must create a backend that enables communication with the storage system.
-
There are sample backend files available in the downloaded installation archive in the
sample-input
folder hierarchy. For NetApp ONTAP systems serving iSCSI, copy thebackend-ontap-san.json
file to your working directory and edit the file.[netapp-user@rhel7 trident-installer]$ cp sample-input/backends-samples/ontap-san/backend-ontap-san.json ./ [netapp-user@rhel7 trident-installer]$ vi backend-ontap-san.json
-
Edit the managementLIF, dataLIF, svm, username, and password values in this file.
{ "version": 1, "storageDriverName": "ontap-san", "managementLIF": "172.21.224.201", "dataLIF": "10.61.181.240", "svm": "trident_svm", "username": "admin", "password": "password" }
-
With this backend file in place, run the following command to create your first backend.
[netapp-user@rhel7 trident-installer]$ ./tridentctl -n trident create backend -f backend-ontap-san.json +------------------------+----------------+--------------------------------------+--------+---------+ | NAME | STORAGE DRIVER | UUID | STATE | VOLUMES | +------------------------+----------------+--------------------------------------+--------+---------+ | ontapsan_10.61.181.241 | ontap-san | 6788533c-7fea-4a35-b797-fb9bb3322b91 | online | 0 | +------------------------+----------------+--------------------------------------+--------+---------+
-
With the backend created, you must next create a storage class. Just as with the backend, there is a sample storage class file that can be edited for the environment available in the sample-inputs folder. Copy it to the working directory and make necessary edits to reflect the backend created.
[netapp-user@rhel7 trident-installer]$ cp sample-input/storage-class-samples/storage-class-csi.yaml.templ ./storage-class-basic.yaml [netapp-user@rhel7 trident-installer]$ vi storage-class-basic.yaml
-
The only edit that must be made to this file is to define the
backendType
value to the name of the storage driver from the newly created backend. Also note the name-field value, which must be referenced in a later step.apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: basic-csi provisioner: csi.trident.netapp.io parameters: backendType: "ontap-san"
There is an optional field called fsType
that is defined in this file. In iSCSI backends, this value can be set to a specific Linux filesystem type (XFS, ext4, etc) or can be deleted to allow OpenShift to decide what filesystem to use. -
Run the
oc
command to create the storage class.[netapp-user@rhel7 trident-installer]$ oc create -f storage-class-basic.yaml storageclass.storage.k8s.io/basic-csi created
-
With the storage class created, you must then create the first persistent volume claim (PVC). There is a sample
pvc-basic.yaml
file that can be used to perform this action located in sample-inputs as well.[netapp-user@rhel7 trident-installer]$ cp sample-input/pvc-samples/pvc-basic.yaml ./ [netapp-user@rhel7 trident-installer]$ vi pvc-basic.yaml
-
The only edit that must be made to this file is ensuring that the
storageClassName
field matches the one just created. The PVC definition can be further customized as required by the workload to be provisioned.kind: PersistentVolumeClaim apiVersion: v1 metadata: name: basic spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: basic-csi
-
Create the PVC by issuing the
oc
command. Creation can take some time depending on the size of the backing volume being created, so you can watch the process as it completes.[netapp-user@rhel7 trident-installer]$ oc create -f pvc-basic.yaml persistentvolumeclaim/basic created [netapp-user@rhel7 trident-installer]$ oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE basic Bound pvc-7ceac1ba-0189-43c7-8f98-094719f7956c 1Gi RWO basic-csi 3s