When an SFS Turbo volume is mounted to a workload container, the root directory is mounted to the container by default. However, the minimum capacity of an SFS Turbo volume is 500 GiB, which exceeds the capacity required by most workloads, leading to a waste of storage resources. To properly use the storage capacity, CCE allows you to dynamically create an SFS Turbo subdirectory when creating a PVC so that different workloads can share one SFS Turbo volume.
Parameter |
Description |
---|---|
PVC Type |
In this example, select SFS Turbo. |
PVC Name |
Enter the PVC name, which must be unique in a namespace. |
Creation Method |
Select New subdirectory. |
Storage Classes |
Choose csi-sfsturbo. |
Access Mode |
SFS Turbo volumes support only ReadWriteMany, indicating that a storage volume can be mounted to multiple nodes in read/write mode. For details, see Volume Access Modes. |
SFS Turbo |
Click Select SFS Turbo. On the displayed page, select the SFS Turbo file system that meets your requirements and click OK. |
Subdirectory |
Enter the absolute path of a subdirectory, for example, /a/b. |
Subdirectory Reclaim Policy |
Whether to retain subdirectories when a PVC is deleted.
|
You can choose Storage in the navigation pane and view the created PVC and PV on the PVCs and PVs tab pages, respectively.
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pvc-sfsturbo-subpath # PVC name namespace: default annotations: everest.io/volume-as: absolute-path # An SFS Turbo subdirectory is used. everest.io/sfsturbo-share-id: <sfsturbo_id> # SFS Turbo ID everest.io/path: /a # Subdirectory that is automatically created, which must be an absolute path everest.io/reclaim-policy: retain-volume-only # When a PVC is deleted, the PV will be deleted, but the subdirectories associated with the PV will be retained. spec: accessModes: - ReadWriteMany # ReadWriteMany must be selected for SFS Turbo. resources: requests: storage: 10Gi # This parameter is only used for verification for the PVCs of the SFS Turbo subdirectory type. The value cannot be empty or 0. storageClassName: csi-sfsturbo # Storage class name of the SFS Turbo file system
Parameter |
Mandatory |
Description |
---|---|---|
everest.io/volume-as |
No |
The value is fixed at absolute-path, indicating that a dynamically created SFS Turbo subdirectory is used. |
everest.io/sfsturbo-share-id |
No |
SFS Turbo ID How to obtain: Log in to the CCE console, choose Service List > Storage > Scalable File Service, and select SFS Turbo. In the list, click the name of the target SFS Turbo file system. On the details page, copy the content following ID. |
everest.io/path |
No |
Subdirectory that is automatically created, which must be an absolute path. |
everest.io/reclaim-policy |
No |
Whether to retain subdirectories when deleting a PVC. This parameter must be used with PV Reclaim Policy. This parameter is available only when the PV reclaim policy is Delete. Options:
|
storage |
Yes |
Requested capacity in the PVC, in Gi. This parameter is only used for verification for the PVCs of the SFS Turbo subdirectory type. The value cannot be empty or 0, and can be fixed at 10 because any value you set does not take effect. |
kubectl apply -f pvc-sfsturbo-subpath.yaml