Storage class
Storage class is used for creating lightweight volumes as well as fileset-based volumes.
Storage class for creating lightweight volumes
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-csi-lt
provisioner: spectrumscale.csi.ibm.com
parameters:
volBackendFs: "gpfs0"
volDirBasePath: "pvfileset/lwdir"
reclaimPolicy: Delete
Field name | Description |
---|---|
volBackendFs | File system on which directory-based volume should be created. |
volDirBasePath | Base path under which all volumes with this storage class created. This path must exist. Relative path from the file system mount point. |
uid | uid/username that should be assigned to the directory. This is optional. The uid/gid must exist on the IBM Spectrum Scale GUI node. |
gid | gid/groupname that should be assigned to the directory. This is optional. The uid/gid must exist on the IBM Spectrum Scale GUI node. |
permissions | Permissions to be set on volume parent directory. This parameter is optional. Note:
|
Storage class for creating fileset based volumes (local file system)
If you want to create PVCs under a file system that is owned by
the primary cluster, then use the storageClass
details provided in the following
example:
In this example, it is assumed that the user wants to create
PVCs under the file system, gpfs0, as per the sample deployment explained in Remote cluster support. The same
storageClass
format is applicable for sample deployment that is explained in Operator.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-csi-fileset
provisioner: spectrumscale.csi.ibm.com
parameters:
volBackendFs: gpfs0
clusterId: "17797813605352210071"
uid: "1000"
gid: "1000"
reclaimPolicy: Delete
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-csi-fileset-dependent
provisioner: spectrumscale.csi.ibm.com
parameters:
volBackendFs: "gpfs0"
clusterId: "17797813605352210071"
uid: "1000"
gid: "1000"
filesetType: "dependent"
parentFileset: "independent-fileset-fset1"
reclaimPolicy: Delete
Field name | Description |
---|---|
volBackendFs | Name of the file system under which the fileset should be created. |
clusterId | Cluster ID of the primary cluster. This is optional. Default value is the cluster ID of the primary cluster. |
uid | uid/username that will be assigned to the fileset. This is optional. The uid/gid must exist on the IBM Spectrum Scale GUI node. Default value is "root". |
gid | gid/group name that will be assigned to the fileset. This is optional. The gid/group name must exist on the IBM Spectrum Scale GUI node. Default value is "root". |
filesetType | Default value is independent. |
parentFileset | Parent fileset name. Valid with filesetType=dependent. Default is root. |
inodeLimit | Inode limit for fileset. This is optional. Valid with filesetType=independent. If not specified, inodeLimit is calculated using this formula: volume size/block size of the file system. |
permissions | Permissions to be set on volume parent directory. This parameter is optional. Note:
|
StorageClass for creating fileset-based volumes (remote file system)
If you want to create PVCs under a file system that is owned by a different cluster other than the primary cluster, then use the storageClass details that are provided in this example. In this example, it is assumed that the user wants to create PVCs under the file system, gpfs0, as per the sample deployment explained in Remote cluster support. The same storageClass format is applicable for sample deployment that is explained in Operator.
Independent fileset storageClass for the file system
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-csi-fileset
provisioner: spectrumscale.csi.ibm.com
parameters:
volBackendFs: "mygpfs"
clusterId: "7118073361626808055"
uid: "1000"
gid: "1000"
reclaimPolicy: Delete
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-csi-fileset-dependent
provisioner: spectrumscale.csi.ibm.com
parameters:
volBackendFs: "mygpfs"
clusterId: " 7118073361626808055"
uid: "1000"
gid: "1000"
filesetType: "dependent"
parentFileset: "independent-fileset-fset1"
reclaimPolicy: Delete
Description of the fields
Field name | Description |
---|---|
volBackendFs | Name of the file system under which the fileset should be created. File system name is the name of the remotely mounted file system on the primary cluster. |
clusterId | Cluster ID of the owning cluster. |
uid | uid/username that will be assigned to the fileset. This is optional. The uid/gid must exist on the IBM Spectrum Scale GUI node of accessing and owning clusters. Default value is "root". |
gid | gid/group name that will be assigned to the fileset. This is optional. The gid/group name must exist on the IBM Spectrum Scale GUI node of the accessing and owning clusters. Default value is "root". |
filesetType | Default is independent. This is optional. |
parentFileset | Parent fileset name. Valid with filesetType=dependent. Default is root. |
inodeLimit | Inode limit for fileset. This is optional. Valid with filesetType=independent. If not specified, inodeLimit is calculated using formula volume Size/Block size of filesystem. |
permissions | Permissions to be set on volume parent directory. This parameter is optional. Note:
|