There is a minimum capacity limit when you create an SFS Turbo volume, so you are not billed based on the capacity you have used. By default, when you mount an SFS Turbo volume to a workload, the root directory of the volume is mapped to the containers. The actual capacity used by the workload is far lower than the limit, which wastes resources. CCE enables efficient utilization of storage capacity by creating SFS Turbo subdirectories dynamically when you create a PVC. If your Everest version is 2.4.73, you can configure the capacities of these subdirectories. This allows multiple workloads to share the SFS Turbo file system.
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. You can customize a StorageClass and configure its reclaim policy and binding mode. For details, see Creating a StorageClass Through the Console. |
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 | Determine whether to retain subdirectories when a PVC is deleted.
|
Subdirectory Capacity |
|
Capacity | The maximum capacity of the subdirectory, in GiB. This parameter is available only when the subdirectory capacity limit is enabled. |
You can choose Storage in the navigation pane and view the created PVC and PV on the PVCs and PVs tabs, respectively.
apiVersion: v1kind: PersistentVolumeClaimmetadata:name: pvc-sfsturbo-subpath # PVC namenamespace: defaultannotations:everest.io/volume-as: absolute-path # An SFS Turbo subdirectory is used.everest.io/sfsturbo-share-id: <sfsturbo_id> # SFS Turbo IDeverest.io/path: /a # Subdirectory that is automatically created, which must be an absolute patheverest.io/reclaim-policy: retain-volume-only # When a PVC is deleted, the PV is deleted, but its associated subdirectories are retained .everest.io/csi.enable-sfsturbo-dir-quota: "true" # The status of quota limitspec:accessModes:- ReadWriteMany # ReadWriteMany must be selected for SFS Turbo.resources:requests:storage: 10Gi # For SFS Turbo subdirectory PVCs, this configuration specifies the capacity of a subdirectory when quota limit is enabled. In other scenarios, it is only used for verification and must not be empty or 0.storageClassName: csi-sfsturbo # StorageClass name of the SFS Turbo file system
Parameter | Mandatory | Description |
|---|---|---|
everest.io/volume-as | Yes | The value is fixed at absolute-path, indicating that a dynamically created SFS Turbo subdirectory is used. |
everest.io/sfsturbo-share-id | Yes | 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 | Yes | Subdirectory that is automatically created, which must be an absolute path. |
everest.io/reclaim-policy | Yes | 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:
|
everest.io/csi.enable-sfsturbo-dir-quota | No | Whether to enable quota limit for a subdirectory. If the value is set to true, the limit is enabled. If the value is empty or set to any other value, the limit is disabled. |
storage | Yes | Requested capacity in the PVC, in Gi.
|
kubectl apply -f pvc-sfsturbo-subpath.yaml