Using IBM Spectrum Scale for storage in your IBM Cloud Private cluster

Create volumes and use them for persistent storage.

IBM Spectrum Scale is a cluster file system that provides concurrent access to a single file system or set of file systems from multiple nodes. For more information about IBM Spectrum Scale, see Overview of IBM Spectrum Scale.

You can use an IBM Spectrum Scale volume for a pod in your IBM Cloud Private cluster. See the following example deployment scenario of IBM Cloud Private with IBM Spectrum Scale.

Example deployment scenario of IBM Cloud Private with IBM Spectrum Scale

You can use IBM Spectrum Scale to provide high availability file system by using hostPath or Network File System (NFS). The following sections provide information about using hostPath and NFS to create and claim a volume.

Configuring IBM Spectrum Scale for IBM Cloud Private

To integrate IBM Cloud Private and IBM Spectrum Scale, you must complete the following tasks:

  1. Set up IBM Spectrum Scale cluster
  2. Create a file system
  3. Mount a file system
  4. Create a fileset
  5. Mount the fileset

Set up IBM Spectrum Scale cluster

Set up your IBM Spectrum Scale cluster. For more information, see IBM Spectrum Scale cluster configurations and Steps for establishing and starting your IBM Spectrum Scale cluster.

You must add all IBM Cloud Private worker nodes as IBM Spectrum Scale client nodes. For more information, see Creating an IBM Spectrum Scale cluster.

Create a file system

You must create a file system in your IBM Spectrum Scale cluster. For more information about creating a file system, see File system creation considerations. For more information about the command to create a file system, see mmcrfs command.

Next, mount the file system.

Mount a file system

Mount the file system on all nodes in the IBM Spectrum Scale cluster. For more information, see Mounting a file system.

Create a fileset

Create a fileset on the file system's device. Filesets provide a means of partitioning the file system to allow administrative operations at a finer granularity than the entire file system.

For more information about filesets, see Filesets.

For more information about the command to create a fileset, see mmcrfileset command.

Mount the fileset

Mount the file system to link the fileset. For more information, see Linking a fileset.

Using hostPath to create a persistent volume

With hostPath, the IBM Spectrum Scale client node is configured as a worker node for IBM Cloud Private. The worker node is used to run applications for IBM Cloud Private and is also used for storage.

Example of using hostPath to create a persistent volume

Following is an example configuration of using hostPath to create a persistent volume.

Create a persistent volume

Create a hostPath persistent volume in your IBM Cloud Private cluster. For more information, see Creating a hostPath PersistentVolume.

Consider this sample YAML file:

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: gpfsstorage
  namespace: default
  labels:
    storage: gpfs      
spec:
  capacity:
    storage: 1Gi
  hostPath:
    path: "/ibm/fs1/filesetpath"             <======= Path where you mounted the filseset
  accessModes:
  - ReadWriteMany

Review the status of the persistent volume. Before you can use the persistent volume, the status of the persistent volume must be Available.

Create a persistent volume claim

Create a persistent volume claim to make it available to be consumed by an application or pod. For more information about creating a persistent volume claim, see Creating a PersistentVolumeClaim.

Consider this sample YAML file:

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: gpfsclaim
  namespace: default  
spec:
  accessModes:
  - ReadWriteMany
  selector:
    matchLabels:
      storage: gpfs            <======== Label of the persistent volume
  resources:
    requests:
      storage: 512Mi
  volumeName: gpfsstorage

Review the status of the persistent volume claim. Before you can use the persistent volume claim, the status of the persistent volume claim must be Bound.

The persistent volume claim is now available to be used by a pod or an application.

When you create an application or pod, specify the name of the persistent volume claim in the Volumes: section to make it available for the pod or application.

Using NFS to create a persistent volume

With NFS, you can use IBM Spectrum Scale client node for dedicated storage. You can export NFS for use with IBM Cloud Private. NFS can be set up for high availability with IBM Spectrum Scale with ReadWriteMany access mode.

Using IBM Storage Enabler for Containers

IBM Storage Enabler for Containers is a plug-in that allows IBM block storage systems and IBM Spectrum Scale to be used as storage devices for Kubernetes container clusters. For more information about IBM Storage Enabler for Containers, see IBM Storage Enabler for Containers version 2.0.0 documentation. For more information about the plug-in installer, see Installer for IBM Storage Enabler for Containers.