Dell EMC Unity is a midrange storage platform that is designed for performance and efficiency. For more information, see Dell EMC Unity.
Ensure that:
To provision Dell EMC Unity storage:
[core@csah ~]$ oc new-project unity
[core@csah unity]$ oc create -f <secret YAML file>
[core@csah unity]$ oc create secret generic unity-creds -n unity --from-file=config=secret.json
Note: You can use the Unity CSI driver to create volumes using either the iSCSI, FC, or NFS protocols.
Create the CSI Unity driver file by following the steps in this sample file in GitHub.
Note: Obtain the arrayID, storagePool, and nasServer information from the UniSphere UI.
[core@csah unity]$ oc create -f <YAML file>
[core@csah unity]$ oc get pods -n unity -o wide
Note: There are two Unity controller pods and one Unity node pod running for every compute node that is running. The Unity pod in each compute node automatically adds any FC or iSCSI Qualified Name into the Unisphere Unity.
[core@csah unity]$ oc get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
unity-fc csi-unity.dellemc.com Delete Immediate true 2m30s
unity-iscsi csi-unity.dellemc.com Delete Immediate true 2m30s
unity-nfs csi-unity.dellemc.com Delete Immediate true 2m30s
Note: For compute nodes running RHCOS, the /etc/iscsi/initiatorname.iscsi file is missing with OCP version 4.6.8 or earlier. For more information, see Red Hat Bug908847 - RHCOS 4.6 - Missing Initiatorname.
Create a YAML file with which to create a PVC by following the steps in this sample file in GitHub.
[core@csah ~]$ oc create -f <YAML file>
Note: Ensure that the storage class name designates an iSCSI configuration. This guide uses unity-iscsi as the iSCSI storage class name.
[core@csah ~]$ oc get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
dynamic-iscsi-unity-pvc Bound csiunity-dd5f2628cb 7Gi RWO unity-iscsi 21m
Create a YAML file with which to create a pod, and mount a volume using the PVC you created in step 2 of Create dynamic iSCSI volumes. Follow the steps in this sample file in Git Hub.
[core@csah unity] $ oc create -f <YAML file>
[core@csah unity]$ oc get pods dynamic-iscsi-unity-pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
dynamic-iscsi-unity-pod 1/1 Running 0 28s 10.131.0.168 compute-2.example.com <none> <none>
[core@csah unity]$ oc exec -it dynamic-iscsi-unity-pod -- df -h /usr/share/nginx/html
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/mpathc 6.9G 32M 6.5G 1% /usr/share/nginx/html
It is not necessary to create a volume manually when you use a dynamic volume. The PV is created automatically and is attached to the PVC through a YAML file.
Create a YAML file to create the PVC by following the steps in this sample file in GitHub.
[core@csah unity] $ oc create -f <YAML file>
Note: Ensure that the storage class name designates an FC configuration. This guide uses unity-fc as the FC storage class name.
[core@csah unity]$ oc get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
dynamic-fc-unity-pvc Bound csiunity-64e67b27c4 6Gi RWO unity-fc 24m
Create a YAML file with which to create a pod, and mount a volume using the PVC you created in step 2 of Create dynamic FC volumes. Follow the steps in this sample file in GitHub.
[core@csah unity] $ oc create -f <YAML file>
[core@csah unity]$ oc get pods dynamic-fc-unity-pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
dynamic-fc-unity-pod 1/1 Running 0 2m59s 10.131.0.167 compute-2.example.com <none> <none>
[core@csah unity]$ oc exec -it dynamic-fc-unity-pod -- df -h /usr/share/nginx/html
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/mpathb 5.9G 24M 5.6G 1% /usr/share/nginx/html
Create a YAML file with which to create the PVC by following the steps in this sample file in GitHub.
[core@csah unity] $ oc create -f <YAML file>
Note: Ensure that the storage class name designates an NFS configuration. This guide uses unity-nfs as the NFS storage class name.
core@csah unity]$ oc get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
dynamic-nfs-unity-pvc Bound csiunity-f81650fca8 4Gi RWX unity-nfs 20m
Create a YAML file with which to create a pod, and mount a volume using the PVC you created in step 2 of Create dynamic NFS volumes. For guidance, see this sample file in GitHub.
[core@csah unity] $ oc create -f <YAML file>
[core@csah unity]$ oc get pods dynamic-nfs-unity-pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
dynamic-nfs-unity-pod 1/1 Running 0 2m59s 10.131.0.12 compute-2.example.com <none> <none>
[core@csah unity]$ oc exec -it dynamic-nfs-unity-pod -- df -h /usr/share/nginx/html
Filesystem Size Used Avail Use% Mounted on
192.168.46.8:/csishare-csiunity-f81650fca8 5.5G 1.6G 4.0G 28% /usr/share/nginx/html
Dell Unity CSI drivers support snapshots of volumes. Create snapshots as a means of backing up either the iSCSI, FC, or NFS volume that you created, and then use the snapshots to create a volume and attach it to the pod.
Note: You can take Unity volume snapshots for all the volumes that are created using FC, iSCSI, or NFS protocols. The following example shows snapshots that were taken using Unity snapshot volume class unity-snap and the iSCSI volume.
[core@csah unity]$ oc get volumesnapshotclass
NAME DRIVER DELETIONPOLICY AGE
unity-snap csi-unity.dellemc.com Delete 2m53s
[core@csah unity]$ oc exec -it dynamic-iscsi-unity-pod /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
root@dynamic-iscsi-unity-pod:/# touch /usr/share/nginx/html/sample
root@dynamic-iscsi-unity-pod:/# echo 'powermax backup' > /usr/share/nginx/html/sample
root@dynamic-iscsi-unity-pod:/# cat /usr/share/nginx/html/sample
unity backup
[core@csah unity]$ oc create -f <YAML file>
[core@csah unity]$ oc get volumesnapshot
NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE
unity-snapshot true dynamic-iscsi-unity-pvc 7Gi unity-snap snapcontent-ccf83239-03bf-4207-80e9-41d02bd5e77d 104s 20s
[core@csah unity]$ oc create -f restore.yaml
persistentvolumeclaim/unity-restore created
[core@csah unity]$ oc get pvc unity-restore
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
unity-restore Bound csiunity-765d68a92b 7Gi RWO unity-iscsi 28s
[core@csah unity]$ oc get pods restore-pod
NAME READY STATUS RESTARTS AGE
restore-pod 1/1 Running 0 9m58s
[core@csah unity]$ oc exec -it restore-pod -- cat /usr/share/nginx/html/sample
unity backup