Remote file system
To configure a file system in the IBM Storage Scale container native cluster, a Filesystem
custom resource (CR) must be defined for each file system you want mounted.
An IBM Storage Scale remote storage cluster serves the file system. Create a RemoteCluster
custom resource for that storage cluster before proceeding. For more information, see RemoteCluster.
Download Remote file system CR sample
Samples are provided as a starting point with some defaults already set in the configuration based on the target environment. Use one of the following commands to download a copy of the sample.
Use caution to select the correct curl command based on your environment. The source files are different but the downloaded files are all named filesystem.remote.yaml
.
Red Hat OpenShift
Use the command to download a copy of the sample for Red Hat OpenShift:
curl -fs https://raw.githubusercontent.com/IBM/ibm-spectrum-scale-container-native/v5.2.3.x/generated/scale/cr/filesystem/filesystem.remote.yaml > filesystem.remote.yaml || echo "Failed to download Filesystem sample CR"
Kubernetes and Google Kubernetes Engine (GKE)
IBM Storage Scale container native deployed in a Google Kubernetes Engine (GKE) is available as a technology preview. For more information, see Support for Google Kubernetes Engine (GKE).
Use the command to download a copy of the sample for Kubernetes or Google Kubernetes Engine (GKE):
curl -fs https://raw.githubusercontent.com/IBM/ibm-spectrum-scale-container-native/v5.2.3.x/generated/scale/cr/filesystem/filesystem.remote-kubernetes.yaml > filesystem.remote.yaml || echo "Failed to download Filesystem sample CR"
Apply the Remote file system resource
-
Edit the
filesystem.remote.yaml
file and change the fields that are specific to your installation. For more information, see Filesystem Spec. -
Use the following command to apply the changed yaml:
kubectl apply -f filesystem.remote.yaml
-
View the
Filesystem
resources with the following command:kubectl get filesystem -n ibm-spectrum-scale
Use the command kubectl edit filesystem <filesystem-name> -n ibm-spectrum-scale
to modify the properties of the resource.
Create a EncryptionConfig
custom resource to encrypt the remote mounted file system for the IBM Storage Scale container native cluster. For more information, see EncryptionConfig.
Filesystem spec
The following table describes the properties for Filesystem
:
Property | Required | Default | Description |
---|---|---|---|
metadata.name |
Yes | None | The name of the CR. |
remote |
No | None | If specified, describes the file system to be a remote mounted file system. |
remote.fs |
Yes, if remote is specified |
None | It is the name of the file system to mount, served by the remote cluster. |
remote.cluster |
Yes, if remote is specified |
None | It is the name of the RemoteCluster resource. |
You can define 1 or more Filesystem
custom resources, one for each file system that you want to mount from the storage cluster.
All file systems are mounted under /mnt
. The mount path cannot be changed.
remote
The spec.remote
section defines the remote file system properties and consists of two fields:
remote.cluster
: This field specifies the name of theRemoteCluster
CR that is defined that is serving the file system.remote.fs
: This field specifies the file system name on the remote storage cluster that is mounted into the container native cluster.
In the following example:
apiVersion: scale.spectrum.ibm.com/v1beta1
kind: Filesystem
...
spec:
remote:
cluster: remotecluster-sample
fs: fs1
The file system fs1
provided by the remote cluster, which is defined in remotecluster-sample
is made available in the container.
If a Filesystem
custom resource is deleted, the file system configuration from the IBM Storage Scale Cluster is not deleted.
Enter the kubectl explain filesystem.spec.remote
command to view more details.
File system status
Status Conditions
can be viewed as a snapshot of the current and most up-to-date status of a Filesystem
instance.
- The
Success
condition is set toTrue
if theFilesystem
is created and mounted.
Examples
More file systems
To create more file systems int the container native cluster, define a custom resource for each file system and apply it to the Kubernetes cluster.
Following the prior examples result in a single file system resource:
$ kubectl get filesystem -n ibm-spectrum-scale
NAME ESTABLISHED AGE
remote-sample True 25h
-
To create another file system that is served by the same remote cluster,
remotecluster-sample
, define a yaml as follows:apiVersion: scale.spectrum.ibm.com/v1beta1 kind: Filesystem metadata: labels: app.kubernetes.io/instance: ibm-spectrum-scale app.kubernetes.io/name: cluster name: c1-fs2 namespace: ibm-spectrum-scale spec: remote: cluster: remotecluster-sample fs: fs2
When applied, the file system
fs2
hosted by the remote clusterremotecluster-sample
is made available to the container native cluster.Displaying the
Filesystem
custom resources shows the following output:$ kubectl get filesystem -n ibm-spectrum-scale -o wide NAME ESTABLISHED REMOTE CLUSTER MAINTENANCE MODE AGE remote-sample True remotecluster-sample not supported 25h c1-fs2 True remotecluster-sample not supported 10m
-
To create another file system that is served by a different remote cluster than
remotecluster-sample-2
, define a yaml as follows:As a prerequisite a RemoteCluster resource that is called
remotecluster-sample-2
must exist. For more information, see RemoteClusters.apiVersion: scale.spectrum.ibm.com/v1beta1 kind: Filesystem metadata: labels: app.kubernetes.io/instance: ibm-spectrum-scale app.kubernetes.io/name: cluster name: xyz-fs2 namespace: ibm-spectrum-scale spec: remote: cluster: remotecluster-sample-2 fs: fs2
When applied, the file system
fs2
hosted by the remote clusterremotecluster-sample-2
is made available to the container native cluster.Displaying the
Filesystem
custom resources shows the following output:$ kubectl get filesystem -n ibm-spectrum-scale -o wide NAME ESTABLISHED REMOTE CLUSTER MAINTENANCE MODE AGE remote-sample True remotecluster-sample not supported 25h c1-fs2 True remotecluster-sample not supported 20m xyz-fs2 True remotecluster-sample-2 not supported 10m