Create storage classes in order to define the storage system pool
name, secret reference, SpaceEfficiency, and
fstype.
Procedure
Use the following procedure to create and apply the storage
classes.
Note:
- This procedure is applicable for both Kubernetes and Red Hat® OpenShift®. For Red Hat OpenShift, replace kubectl with oc in all relevant
commands.
|
-
Create a storage class yaml file,
storageclass-gold.yaml.
Update the capabilities, pools, and array secrets accordingly.
Use the
SpaceEfficiency parameters for each storage system, as defined in
Table 1. These values are not
case sensitive.
Table 1. SpaceEfficiency parameter definitions per storage system
type
| Storage system type |
SpaceEfficiency parameter options |
| IBM FlashSystem® A9000 and A9000R |
Always includes deduplication and compression. No need to specify during
configuration.
|
| IBM Spectrum® Virtualize Family |
- thin
- compressed
- deduplicated
|
| IBM® DS8000® Family |
- standard (default value)
- thin
Note: If not specified, the default value is standard.
|
- The IBM DS8000 Family pool value is VALUE_POOL_ID (and
not VALUE_POOL_NAME as indicated in the example below).
- The csi.storage.k8s.io/fstype parameter is optional. The values allowed are
ext4 or xfs. The default value is
ext4.
- The volume_name_prefix parameter is optional.
- For IBM DS8000 Family, the maximum prefix length is 5 characters.
- The maximum prefix length for other systems is 20 characters.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: <NAME>
provisioner: block.csi.ibm.com
parameters:
#capabilities: # Optional
# SpaceEfficiency=<VALUE>
capacity:
pool=<POOL_NAME>
csi.storage.k8s.io/provisioner-secret-name: <ARRAY_SECRET>
csi.storage.k8s.io/provisioner-secret-namespace: <ARRAY_SECRET_NAMESPACE>
csi.storage.k8s.io/controller-publish-secret-name: <ARRAY_SECRET>
csi.storage.k8s.io/controller-publish-secret-namespace: <ARRAY_SECRET_NAMESPACE>
#csi.storage.k8s.io/fstype: <FSTYPE> # Optional. values ext4\xfs. The default is ext4.
#volume_name_prefix: <PREFIX> # Optional
-
Apply the storage class.
$> kubectl apply -f storageclass-gold.yaml
The storageclass.storage.k8s.io/gold created message is emitted.