### Operator Installation
-
On the OpenShift console, navigate to OperatorHub and use the keyword filter to search for Dell Container Storage Modules.
-
Click Dell Container Storage Modules tile
-
Keep all default settings and click Install.
Verify that the operator is deployed
oc get operators
NAME AGE
dell-csm-operator-certified.openshift-operators 2d21h
oc get pod -n openshift-operators
NAME READY STATUS RESTARTS AGE
dell-csm-operator-controller-manager-86dcdc8c48-6dkxm 2/2 Running 21 (19h ago) 2d21h
CSI Driver Installation
-
Create project:
Use this command to create new project. You can use any project name instead of unity
.
-
Create config secret:
Create a file called config.yaml
or use sample:
Example:
cat << EOF > config.yaml
storageArrayList:
- arrayId: "APM00******1" # unique array id of the Unisphere array
username: "user" # username for connecting to API
password: "password" # password for connecting to API
endpoint: "https://10.1.1.1/" # full URL path to the Unity XT API
skipCertificateValidation: true # indicates if client side validation of (management)server's certificate can be skipped
isDefault: true # treat current array as a default (would be used by storage classes without arrayID parameter)
EOF
Add blocks for each unity array in config.yaml
, and include both source and target arrays if replication is enabled.
Edit the file, then run the command to create the unity-config
.
oc create secret generic unity-config --from-file=config=config.yaml -n unity --dry-run=client -oyaml > secret-unity-config.yaml
Use this command to create the config:
oc apply -f secret-unity-config.yaml
Use this command to replace or update the config:
oc replace -f secret-unity-config.yaml --force
Verify config secret is created.
oc get secret -n unity
NAME TYPE DATA AGE
unity-config Opaque 1 3h7m
-
Create Custom Resource ContainerStorageModule for unity.
Use this command to create the ContainerStorageModule Custom Resource:
oc create -f csm-unity.yaml
Example:
cat << EOF > csm-unity.yaml
apiVersion: storage.dell.com/v1
kind: ContainerStorageModule
metadata:
name: unity
namespace: unity
spec:
driver:
csiDriverType: "unity"
configVersion: v2.13.0
forceRemoveDriver: true
EOF
Detailed Configuration: Use the sample file for detailed settings.
To set the parameters in CR. The table shows the main settings of the unity driver and their defaults.
Parameters
Parameter |
Description |
Required |
Default |
replicas |
Controls the number of controller pods you deploy. If the number of controller pods is greater than the number of available nodes, the excess pods will be in pending state until new nodes are available for scheduling. Default is 2 which allows for Controller high availability. |
Yes |
2 |
namespace |
Specifies namespace where the driver will be installed |
Yes |
“unity” |
fsGroupPolicy |
Defines which FS Group policy mode to be used. Supported modes None, File and ReadWriteOnceWithFSType . In OCP <= 4.16 and K8s <= 1.29, fsGroupPolicy is an immutable field. |
No |
“ReadWriteOnceWithFSType” |
storageCapacity.enabled |
Enable/Disable storage capacity tracking |
No |
true |
storageCapacity.pollInterval |
Configure how often the driver checks for changed capacity |
No |
5m |
Common parameters for node and controller |
|
|
|
X_CSI_UNITY_ALLOW_MULTI_POD_ACCESS |
To enable sharing of volumes across multiple pods within the same node in RWO access mode |
No |
false |
X_CSI_UNITY_SYNC_NODEINFO_INTERVAL |
Time interval to add node info to array. Default 15 minutes. Minimum value should be 1 |
No |
15 |
CSI_LOG_LEVEL |
Sets the logging level of the driver |
true |
info |
TENANT_NAME |
Tenant name added while adding host entry to the array |
No |
|
CERT_SECRET_COUNT |
Represents the number of certificate secrets, which the user is going to create for SSL authentication. (unity-cert-0..unity-cert-n). The minimum value should be 1. |
false |
1 |
X_CSI_UNITY_SKIP_CERTIFICATE_VALIDATION |
Specifies if the driver is going to validate unisphere certs while connecting to the Unisphere REST API interface.If it is set to false, then a secret unity-certs has to be created with an X.509 certificate of CA which signed the Unisphere certificate |
No |
true |
Controller parameters |
|
|
|
X_CSI_HEALTH_MONITOR_ENABLED |
Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition |
No |
false |
Node parameters |
|
|
|
X_CSI_HEALTH_MONITOR_ENABLED |
Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition |
No |
false |
X_CSI_ALLOWED_NETWORKS |
Custom networks for Unity export. List of networks that can be used for NFS I/O traffic, CIDR format should be used “ip/prefix, ip/prefix” |
No |
empty |
Check if ContainerStorageModule CR is created successfully:
oc get csm unity -n unity
NAME CREATIONTIME CSIDRIVERTYPE CONFIGVERSION STATE
unity 3h unity v2.13.0 Succeeded
Check the status of the CR to verify if the driver installation is in the Succeeded
state. If the status is not Succeeded
, see the Troubleshooting guide for more information.
-
Create Storage class:
Use this command to create the Storage Class:
oc apply -f sc-unity.yaml
Example:
cat << EOF > sc-unity.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: unity-<ARRAY_ID>-iscsi
provisioner: csi-unity.dellemc.com
reclaimPolicy: Delete
allowVolumeExpansion: true
volumeBindingMode: Immediate
parameters:
protocol: iSCSI
arrayId: <ARRAY_ID>
storagepool: <STORAGE_POOL>
thinProvisioned: "true"
tieringPolicy: <TIERING_POLICY>
hostIOLimitName: <HOST_IO_LIMIT_NAME>
csi.storage.k8s.io/fstype: ext4
EOF
Replace placeholders with actual values for your unity array and various storage class sample refer here
Verify Storage Class is created:
oc get storageclass unity
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
unity (default) csi-unity.dellemc.com Delete Immediate true 3h8m
-
Create Volume Snapshot Class:
Use this command to create the Volume Snapshot:
oc apply -f vsclass-unity.yaml
Example:
cat << EOF > vsclass-unity.yaml
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: unity-snapclass
driver: csi-unity.dellemc.com
deletionPolicy: Delete
EOF
Verify Volume Snapshot Class is created:
oc get volumesnapshotclass
NAME DRIVER DELETIONPOLICY AGE
unity-snapclass csi-unity.dellemc.com Delete 3h9m
Configurations
Persistent Volume Claim
-
Create Persistent Volume Claim
Use this command to create the Persistent Volume Claim:
oc apply -f pvc-unity.yaml
Example:
cat << EOF > pvc-unity.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-unity
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: unity
EOF
Verify Persistent Volume Claim is created:
oc get pvc -n default
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
pvc-unity Bound ocp08-9f103c4fc6 8Gi RWO unity <unset> 4s
-
Create Pod which uses Persistent Volume Claim with storage class
Use this command to create the Pod:
oc apply -f pod-unity.yaml
Example:
cat << 'EOF' > pod-unity.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod-unity
namespace: default
spec:
containers:
- name: ubi
image: registry.access.redhat.com/ubi9/ubi
command: [ "bash", "-c" ]
args: [ "while true; do touch /data/file-$(date +%s); sleep 20; done;" ]
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-unity
EOF
Verify pod is created:
oc get pod -n default
NAME READY STATUS RESTARTS AGE
pod-unity 1/1 Running 0 109s
-
Delete Persistance Volume Claim
Use this command to Delete Persistance Volume Claim:
oc delete pvc pvc-unity-restore -n default
Verify restore pvc is deleted:
oc get pvc -n default
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
pvc-unity Bound ocp08-095f7d3c52 8Gi RWO unity <unset> 7m34s
Volume Snapshot
-
Create Volume Snapshot
Use this command to create the Volume Snapshot:
oc apply -f vs-unity.yaml
Example:
cat << 'EOF' > vs-unity.yaml
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: vs-unity'
namespace: default
spec:
volumeSnapshotClassName: vsclass-unity
source:
persistentVolumeClaimName: pvc-unity
EOF
Verify Volume Snapshot is created:
oc get volumesnapshot -n default
NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE
vs-unity true pvc-unity 8Gi vsclass-unity snapcontent-80e99281-0d96-4275-b4aa-50301d110bd4 2m57s 12s
Verify Volume Snapshot content is created:
oc get volumesnapshotcontent
NAME READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT VOLUMESNAPSHOTNAMESPACE AGE
snapcontent-80e99281-0d96-4275-b4aa-50301d110bd4 true 8589934592 Delete csi-unity.dellemc.com vsclass-unity vs-unity default 23s
-
Restore Snapshot
Use this command to Restore Snapshot:
oc apply -f pvc-unity.yaml
Example:
cat << 'EOF' > pvc-unity-restore.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-unity-restore
namespace: default
spec:
storageClassName: unity
dataSource:
name: vs-unity
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
EOF
Verify restore pvc is created:
oc get pvc -n default
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
pvc-unity Bound ocp08-095f7d3c52 8Gi RWO unity <unset> 7m34s
pvc-unity-restore Bound ocp08-19874e9042 8Gi RWO unity <unset> 4s
-
Delete Volume Snapshot
Use this command to Delete Volume Snapshot:
oc delete vs vs-unity -n default
Verify Volume Snapshot is deleted:
oc get vs -n default
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE