IBM Systems Block Storage CSI driver
The Block Storage for Classic CSI driver for IBM Cloud Satellite® is based on an IBM open-source project, and integrated into the IBM Storage orchestration for containers. IBM Storage orchestration for containers enables enterprises to implement a modern container-driven hybrid multicloud environment that can reduce IT costs and enhance business agility, while continuing to derive value from existing systems.
For full release notes, compatibility, installation, and user information, see the Block Storage for Classic CSI driver documentation.
Supported IBM storage systems for Satellite include,
- IBM Spectrum Virtualize Family including IBM SAN Volume Controller (SVC) and IBM FlashSystem® family members built with IBM Spectrum® Virtualize (FlashSystem 5010, 5030, 5100, 5200, 7200, 9100, 9200, 9200R)
- IBM FlashSystem A9000 and A9000R
- IBM DS8000 Family
Before you can deploy storage templates to clusters in your location, make sure you set up Satellite Config by selecting the Enable cluster admin access for Satellite Config option in the console or including the --enable-config-admin
option when you create your cluster.
You cannot scope Satellite storage service to resource groups. However, if you are scoping other resources such as location and cluster to resource groups, you need to add Satellite reader and link administrator role for all resources in the account.
Prerequisites for using Block Storage for Classic
Be sure to complete all prerequisite and installation steps before assigning hosts to your location. Do not create a Kubernetes cluster.
Creating and assigning a configuration in the console
-
Review the parameter reference.
-
From the Locations console, select the location where you want to create a storage configuration.
-
Select Storage > Create storage configuration
-
Enter a name for your configuration.
-
Select the Storage type.
-
Select the Version and click Next
-
If the Storage type that you selected accepts custom parameters, enter them on the Parameters tab.
-
If the Storage type that you selected requires secrets, enter them on the Secrets tab.
-
On the Storage classes tab, review the storage classes that are deployed by the configuration or create a custom storage class.
-
On the Assign to service tab, select the service that you want to assign your configuration to.
-
Click Complete to assign your storage configuration.
Creating a configuration in the CLI
-
Review the parameter reference for the template version that you want to use.
-
Log in to the IBM Cloud CLI.
ibmcloud login
-
List your Satellite locations and note the
Managed from
column.ibmcloud sat location ls
-
Target the
Managed from
region of your Satellite location. For example, forwdc
targetus-east
. For more information, see Satellite regions.ibmcloud target -r us-east
-
If you use a resource group other than
default
, target it.ibmcloud target -g <resource-group>
-
Copy one of the following example command for the template version that you want to use. For more information about the command, see
ibmcloud sat storage config create
in the command reference.Example command to create a version 1.10.0 configuration.
ibmcloud sat storage config create --location LOCATION --name NAME --template-name ibm-system-storage-block-csi-driver --template-version 1.10.0 --param "namespace=NAMESPACE"
Example command to create a version 1.11.1 configuration.
ibmcloud sat storage config create --location LOCATION --name NAME --template-name ibm-system-storage-block-csi-driver --template-version 1.11.1 --param "namespace=NAMESPACE"
Example command to create a version 1.11.2 configuration.
ibmcloud sat storage config create --location LOCATION --name NAME --template-name ibm-system-storage-block-csi-driver --template-version 1.11.2 --param "namespace=NAMESPACE" --param "secret-name=SECRET-NAME" --param "secret-management-address=SECRET-MANAGEMENT-ADDRESS" --param "secret-username=SECRET-USERNAME" --param "secret-password=SECRET-PASSWORD"
-
Customize the command based on the settings that you want to use.
-
Run the command to create a configuration.
-
Verify your configuration was created.
ibmcloud sat storage config get --config CONFIG
Creating a configuration in the API
-
Generate an API key, then request a refresh token. For more information, see Generating an IBM Cloud IAM token by using an API key.
-
Review the parameter reference for the template version that you want to use.
-
Copy one of the following example requests and replace the variables that you want to use.
Example request to create a version 1.10.0 configuration.
curl -X POST "https://containers.cloud.ibm.com/global/v2/storage/satellite/createStorageConfigurationByController" -H "accept: application/json" -H "Authorization: TOKEN" -H "Content-Type: application/json" -d "{ \"config-name\": \"string\", \"controller\": \"string\", \"storage-class-parameters\": [ { \"additionalProp1\": \"string\", \"additionalProp2\": \"string\", \"additionalProp3\": \"string\" } ], \"storage-template-name\": \"ibm-system-storage-block-csi-driver\", \"storage-template-version\": \"1.10.0\", \"update-assignments\": true, \"user-config-parameters\": { \"entry.name\": \"NAMESPACE\",\"user-secret-parameters\": }
Example request to create a version 1.11.1 configuration.
curl -X POST "https://containers.cloud.ibm.com/global/v2/storage/satellite/createStorageConfigurationByController" -H "accept: application/json" -H "Authorization: TOKEN" -H "Content-Type: application/json" -d "{ \"config-name\": \"string\", \"controller\": \"string\", \"storage-class-parameters\": [ { \"additionalProp1\": \"string\", \"additionalProp2\": \"string\", \"additionalProp3\": \"string\" } ], \"storage-template-name\": \"ibm-system-storage-block-csi-driver\", \"storage-template-version\": \"1.11.1\", \"update-assignments\": true, \"user-config-parameters\": { \"entry.name\": \"NAMESPACE\",\"user-secret-parameters\": }
Example request to create a version 1.11.2 configuration.
curl -X POST "https://containers.cloud.ibm.com/global/v2/storage/satellite/createStorageConfigurationByController" -H "accept: application/json" -H "Authorization: TOKEN" -H "Content-Type: application/json" -d "{ \"config-name\": \"string\", \"controller\": \"string\", \"storage-class-parameters\": [ { \"additionalProp1\": \"string\", \"additionalProp2\": \"string\", \"additionalProp3\": \"string\" } ], \"storage-template-name\": \"ibm-system-storage-block-csi-driver\", \"storage-template-version\": \"1.11.2\", \"update-assignments\": true, \"user-config-parameters\": { \"entry.name\": \"NAMESPACE\", { \"entry.name\": \"SECRET-NAME\",\"user-secret-parameters\": { \"entry.name\": \"SECRET-MANAGEMENT-ADDRESS\",{ \"entry.name\": \"SECRET-USERNAME\",{ \"entry.name\": \"SECRET-PASSWORD\",}
Creating an assignment in the CLI
-
List your storage configurations and make a note of the storage configuration that you want to assign to your clusters.
ibmcloud sat storage config ls
-
Get the ID of the cluster, cluster group, or service that you want to assign storage to.
To make sure that your cluster is registered with Satellite Config or to create groups, see Setting up clusters to use with Satellite Config.
Example command to list cluster groups.
ibmcloud sat group ls
Example command to list clusters.
ibmcloud oc cluster ls --provider satellite
Example command to list Satellite services.
ibmcloud sat service ls --location <location>
-
Assign your storage configuration to the cluster, group, or service that you retrieved earlier. For more information, see the
ibmcloud sat storage assignment create
command.Example command to assign a configuration to a cluster group.
ibmcloud sat storage assignment create --group GROUP --config CONFIG --name NAME
Example command to assign a configuration to a cluster.
ibmcloud sat storage assignment create --cluster CLUSTER --config CONFIG --name NAME
Example command to assign a configuration to a service cluster.
ibmcloud sat storage assignment create --service-cluster-id CLUSTER --config CONFIG --name NAME
-
Verify that your assignment is created.
ibmcloud sat storage assignment ls (--cluster CLUSTER | --config CONFIG | --location LOCATION | --service-cluster-id CLUSTER)
Creating a storage assignment in the API
-
Copy one of the following example requests.
Example request to assign a configuration to a cluster.
curl -X POST "https://containers.cloud.ibm.com/global/v2/storage/satellite/createAssignmentByCluster" -H "accept: application/json" -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -d "{ \"channelName\": \"CONFIGURATION-NAME\", \"cluster\": \"CLUSTER-ID\", \"controller\": \"LOCATION-ID\", \"name\": \"ASSIGNMENT-NAME\"}"
Example request to assign configuration to a cluster group.
curl -X POST "https://containers.cloud.ibm.com/global/v2/storage/satellite/createAssignment" -H "accept: application/json" -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -d "{ \"channelName\": \"CONFIGURATION-NAME\", \"cluster\": \"string\", \"groups\": [ \"CLUSTER-GROUP\" ], \"name\": \"ASSIGNMENT-NAME\"}"
-
Replace the variables with your details and run the request.
-
Verify the assignment was created by listing your assignments.
curl -X GET "https://containers.cloud.ibm.com/global/v2/storage/satellite/getAssignments" -H "accept: application/json" -H "Authorization: Bearer TOKEN"
Updating storage assignments in the console
You can use the Satellite console to apply the latest patch updates to your assignments.
-
From the Locations page in the Satellite console, select your location.
-
Click the Storage tab to view your configurations.
-
Click the configuration you want to update.
-
Click information Information (i) icon to apply the latest revision or patch.
-
Optional: Enable automatic patch updates for your storage assignment. Enabling automatic patch updates ensures that your assignment always has the latest security fixes.
If you enable automatic patch updates, you must still apply major updates manually.
Manually upgrading assignments in the CLI
Upgrade an assignment to use the latest storage template revision.
-
List your Satellite storage assignments, make a note of the Satellite assignment you want to upgrade.
ibmcloud sat storage assignment ls
-
List the Satellite storage templates to see the latest available versions.
ibmcloud sat storage template ls
-
Upgrade the Satellite assignment.
Example command to upgrade an assignment.
ibmcloud sat storage assignment upgrade --assignment ASSIGNMENT
Enabling automatic patch updates for configurations and assignments in the CLI
You can use the sat storage assignment autopatch enable
CLI to enable automatic patch updates for your assignments. Enabling automatic patch updates applies the latest storage template revisions (patches) automatically. You must
still apply major updates manually.
-
List your Satellite storage configurations. Make a note of the configuration ID.
ibmcloud sat storage assignment ls
-
Run one of the following example commands to enable automatic patch updates for your configuration and its associated assignments. Enter the configuration ID that you retrieved in the previous step.
Example command to enable automatic patch updates for an assignment.
ibmcloud sat storage assignment autopatch enable --config CONFIG (--all | --assignment ASSIGNMENT-ID [--assignment ASSIGNMENT-ID])
Example command to enable automatic patch updates for all storage assignments under a given configuration.
ibmcloud sat storage assignment autopatch enable --config CONFIG --all
Example command to disable automatic patch updates for all assignments under a specific configuration.
ibmcloud sat storage assignment autopatch disable --config CONFIG --all
Example command to disable automatic patch updates for an single assignment and a specific configuration.
ibmcloud sat storage assignment autopatch disable --config CONFIG --assignment ASSIGNMENT-ID
Example command to disable automatic patch updates for an multiple assignment and a specific configuration.
ibmcloud sat storage assignment autopatch disable --config CONFIG --assignment ASSIGNMENT-ID --assignment ASSIGNMENT-ID
Upgrading a configuration and assignments in the API
You can use the /v2/storage/satellite/updateAssignment
API to update your assignments with new clusters
or cluster groups. Set updateConfigVersion
to true
to apply the revision update.
-
Copy the following example request and replace the variables for the cluster groups and assignments that you want to update.
curl -X PATCH "https://containers.cloud.ibm.com/global/v2/storage/satellite/updateAssignment" -H "accept: application/json" -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -d "{ \"groups\": [ \"CLUSTER-GROUPS\" ], \"name\": \"ASSIGNMENT-NAME\", \"updateConfigVersion\": true, \"uuid\": \"ASSIGNMENT-ID\"}"
-
Run the request.
-
Get the details of you assignment to verify the update.
curl -X GET "https://containers.cloud.ibm.com/global/v2/storage/satellite/getAssignment?uuid=ASSIGNMENT-ID" -H "accept: application/json" -H "Authorization: Bearer TOKEN"
Enabling automatic patch updates for assignments in the API
You can use the /v2/storage/satellite/setAssignmentAutoupgrade
API to enable automatic patch updates for your assignments. Enabling automatic patch updates applies the latest storage template revisions (patches) automatically. You
must still apply major updates manually.
-
Copy the following example request and replace the variables for the cluster groups and assignments that you want to update.
curl -X PATCH "https://containers.cloud.ibm.com/global/v2/storage/satellite/setAssignmentAutoupgrade" -H "accept: application/json" -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -d { "config": "string", "controller": "string", "autopatch": boolean,"assignment" : { "all": boolean, "uuid": ["string", "string", ...], } }
-
Run the request.
-
Get the details of you assignment to verify the upgrade.
curl -X GET "https://containers.cloud.ibm.com/global/v2/storage/satellite/getAssignment?uuid=ASSIGNMENT-ID" -H "accept: application/json" -H "Authorization: Bearer TOKEN"
Deploying an app that uses Block Storage for Classic
You can use the ibm-system-storage-block-csi-driver
to create PVCs that you can use in your cluster workloads.
- Create a Kubernetes secret configuration file that contains your Block Storage for Classic credentials.
kind: Secret apiVersion: v1 metadata: name: demo-secret namespace: default type: Opaque stringData: management_address: demo-management-address # Example: baremetal-cluster.xiv.ibm.com username: demo-username data: password: AAAA1AAA
- Create the secret in your cluster.
oc apply -f <secret.yaml>
- Create a storage class that uses the Block Storage for Classic driver.
kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: demo-storageclass provisioner: block.csi.ibm.com parameters: SpaceEfficiency: deduplicated # Optional. pool: demo-pool csi.storage.k8s.io/provisioner-secret-name: demo-secret csi.storage.k8s.io/provisioner-secret-namespace: default csi.storage.k8s.io/controller-publish-secret-name: demo-secret csi.storage.k8s.io/controller-publish-secret-namespace: default csi.storage.k8s.io/controller-expand-secret-name: demo-secret csi.storage.k8s.io/controller-expand-secret-namespace: default csi.storage.k8s.io/fstype: xfs # Optional. Values ext4\xfs. The default is ext4. volume_name_prefix: demoPVC # Optional allowVolumeExpansion: true
- Create the storage class in your cluster.
oc apply -f sc.yaml
- Verify that the storage class is created.
oc get sc
- Create a PVC that references the storage class that you created earlier.
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: demo-pvc-file spec: volumeMode: Filesystem accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: demo-storageclass
- Create the PVC in your cluster.
oc apply -f pvc.yaml
- Verify that the PVC is created and the status is
Bound
.oc get pvc
- Create a YAML configuration file for a stateful set that mounts the PVC that you created.
kind: StatefulSet apiVersion: apps/v1 metadata: name: demo-statefulset-file-system spec: selector: matchLabels: app: demo-statefulset serviceName: demo-statefulset replicas: 1 template: metadata: labels: app: demo-statefulset spec: containers: - name: demo-container image: registry.access.redhat.com/ubi8/ubi:latest command: [ "/bin/sh", "-c", "--" ] args: [ "while true; do sleep 30; done;" ] volumeMounts: - name: demo-volume-file-system mountPath: "/data" volumes: - name: demo-volume-file-system persistentVolumeClaim: claimName: demo-pvc-file
- Create the pod in your cluster.
oc apply -f <stateful-set>.yaml
- Verify that the pod is deployed. Note that it might take a few minutes for your app to get into a
Running
state.
Example outputoc get pods
NAME READY STATUS RESTARTS AGE demo-statefulset-file-system-0 1/1 Running 0 2m58s
- Verify that the app can write to your IBM Block Storage instance.
- Log in to your pod.
oc exec demo-statefulset-file-system-0 -it bash
- Change to the
/data
directory, write atest.txt
file, and view the contents of thetest.txt
file to confirm that your app can write data to your persistent storage.
Example outputcd data && echo "Testing" >> test.txt && cat test.txt
Testing
- Exit the pod.
exit
- Log in to your pod.
Parameter reference
1.10.0 parameter reference
Display name | CLI option | Type | Description | Required? | Default value |
---|---|---|---|---|---|
Namespace | namespace |
Config | The namespace where you want to create the deployment. | true | default |
1.11.1 parameter reference
Display name | CLI option | Type | Description | Required? | Default value |
---|---|---|---|---|---|
Namespace | namespace |
Config | The namespace where you want to create the deployment. | true | default |
1.11.2 parameter reference
Display name | CLI option | Type | Description | Required? | Default value |
---|---|---|---|---|---|
Namespace | namespace |
Config | The namespace where you want to create the deployment. | true | default |
Secret Name | secret-name |
Config | The name of the secret to create. | true | N/A |
Secret Management Address | secret-management-address |
Secret | The address of the management server. This could be an IP address or a URL. For example: example-cluster.xiv.ibm.com . |
true | N/A |
Secret Username | secret-username |
Secret | The username to use to authenticate to the management server. | true | N/A |
Secret Password | secret-password |
Secret | The password to use to authenticate to the management server. | true | N/A |
Getting help and support for Block Storage for Classic
- Review the FAQs in the Block Storage for Classic docs.
- Review the troubleshooting documentation to troubleshoot and resolve common issues.
- Check the status of the IBM Cloud platform and resources by going to the Status page.
- Review Stack Overflow to see whether other users experienced the same problem. Tag any questions with
ibm-cloud
. - If you run into an issue with Block Storage for Classic submit a support request with IBM Cloud® Support.