Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cloud Container Engine/ User Guide (Kuala Lumpur Region)/ Storage/ SFS Turbo/ (Recommended) Creating an SFS Turbo Subdirectory Using a Dynamic PV

(Recommended) Creating an SFS Turbo Subdirectory Using a Dynamic PV

Updated on 2024-10-14 GMT+08:00

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.

Prerequisites

  • You have created a cluster and installed the CCE Container Storage (Everest) add-on of v2.3.23 or later in the cluster.
  • To create a cluster using commands, ensure kubectl is used. For details, see Connecting to a Cluster Using kubectl.
  • You have created an available SFS Turbo file system, and the SFS Turbo file system and the cluster are in the same VPC.

Dynamically Creating an SFS Turbo Subdirectory on the Console

  1. Log in to the CCE console and click the cluster name to access the cluster console.
  2. Choose Storage in the navigation pane. In the right pane, click the PVCs tab. Click Create PVC in the upper right corner. In the dialog box displayed, configure PVC parameters.

    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.

    • Retain: If a PVC is deleted, the PV will be deleted, but the subdirectories associated with the PV will be retained.
    • Delete: After a PVC is deleted, the PV and its associated subdirectories will also be deleted.
      NOTE:

      When a subdirectory is deleted, only the absolute path of the subdirectory configured in the PVC will be deleted. The upper-layer directory will not be deleted.

  3. Click Create to create a PVC and a PV.

    You can choose Storage in the navigation pane and view the created PVC and PV on the PVCs and PVs tab pages, respectively.

Dynamically Creating an SFS Turbo Subdirectory Using kubectl

  1. Use kubectl to access the cluster.
  2. Create the pvc-sfsturbo-subpath.yaml file.

    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
    Table 1 Key parameters

    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:

    • retain-volume-only: If a PVC is deleted, the PV will be deleted, but the subdirectories associated with the PV will be retained.
    • delete: After a PVC is deleted, the PV and its associated subdirectories will also be deleted.
      NOTE:

      When a subdirectory is deleted, only the absolute path of the subdirectory configured in the PVC will be deleted. The upper-layer directory will not be deleted.

    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.

  3. Run the following command to create a PVC:

    kubectl apply -f pvc-sfsturbo-subpath.yaml

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback