Symptoms
When Persistent Volumes (PVs) are created with quota and replication enabled, an incorrect quota is set for the target side read-only directories. The incorrect quota is based on the consumed nonzero source size instead of the assigned quota of the source. This may create issues when the user performs failover and wants to write data to the failed over site. If a lower quota limit is set, no new writes can be performed on the target side after failover. If source PVs do not have any consumed size during target PV creation, no quota is set for the target side read-only directories.
The issue is reported in the article https://github.com/dell/csm/issues/753
Cause
The quota for the target directory is calculated based on the source directory’s consumed size during target PV creation.
Resolution
For each PV on the source Kubernetes cluster, find the path to the directory associated with that PV. Use the command below:
k get pv -o yaml
The path is found from the specification field of the persistent volume object. Get the quota of the source directory on the source PowerScale cluster and set the same for the directory on the target PowerScale cluster.
apiVersion: v1
kind: PersistentVolume
spec:
........
csi:
driver: csi-isilon.dellemc.com
volumeAttributes:
.......
Name: directory1
Path: /path/to/directory1
.......
volumeMode: Filesystem
Below is the CLI command to retrieve and set the quota on the PowerScale clusters. Run the below command to get the hard threshold value for the directory on the source PowerScale cluster:
Cluster-1# isi quota quotas view --path /path/to/directory --type directory
Path: /path/to/directory
Type: directory
Enforced: Yes
........
Thresholds
Hard Threshold: 8.00G
Hard Exceeded: No
........
If the target directory has an incorrect quota set, run the below command on the target PowerScale cluster to update the hard threshold to the same value as the source.
Cluster-2# isi quota quotas modify --path /path/to/directory --type directory --hard-threshold 8GB
If the target directory has no quota set, run the below command on the target PowerScale cluster to set the hard threshold to the same value as the source.
Cluster-2# isi quota quotas create --path /path/to/directory --type directory --hard-threshold 8GB --enforced true --container true