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
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/ Scalable File Service Turbo/ Getting Started/ Mounting and Using an SFS Turbo File System on Linux ECSs

Mounting and Using an SFS Turbo File System on Linux ECSs

Updated on 2025-01-09 GMT+08:00

Scenarios

To use an SFS Turbo file system for file sharing, you need to create an SFS Turbo file system and mount it on multiple cloud servers.

This section describes how to create an NFS file system on the SFS Turbo console and mount it to Linux ECSs for file upload and download.

Operation Process

Procedure

Description

Preparations

Sign up for a HUAWEI ID, complete real-name authentication, enable Huawei Cloud services, and top up your account. Then, create a VPC and ECSs.

Step 1: Creating an SFS Turbo File System

Create an SFS Turbo file system.

Step 2: Mounting the SFS Turbo File System

Mount the SFS Turbo file system to the ECSs.

Step 3: Using the SFS Turbo File System

Use the SFS Turbo file system for file upload and download.

Preparations

  1. Sign up for Huawei Cloud and complete real-name authentication.

    Before purchasing SFS Turbo, sign up for a HUAWEI ID, enable Huawei Cloud services, and complete real-name authentication.

    If you have enabled Huawei Cloud services and completed real-name authentication, skip this step.

  2. Top up your account.

    Ensure that your account has sufficient balance or has a valid payment method configured. For details, see Topping Up an Account.

  3. Check whether a VPC and ECSs need to be created.

    Before creating an SFS Turbo file system, check whether a VPC and ECSs are available, and whether the ECSs are in this VPC. If they are in different VPCs, you can establish communication between SFS Turbo and ECSs using VPC peering connections. For details, see VPC Peering Connection.

    • Create a VPC.

    Create a VPC by referring to Creating a VPC in the Virtual Private Cloud User Guide.

    • Create ECSs.

    Buy ECSs in CN-Hong Kong in the created VPC by referring to Purchasing and Using a Linux ECS.

Step 1: Creating an SFS Turbo File System

File systems are containers that store files in SFS Turbo. You need to create an SFS Turbo file system before storing data in it.

This example covers only some key parameters settings. Retain the default values for other parameters. For more information, see Creating an SFS Turbo File System.

  1. Log in to SFS Turbo console.
  2. Select the region where the ECSs are deployed. A file system can only be mounted to an ECS when they are in the same region and VPC. Select the CN-Hong Kong region.
  3. Click Create File System.

  4. Configure the file system parameters, which are described in the following table.

    Parameter

    Example Value

    Description

    Billing Mode

    Pay-per-use

    Select a billing mode, Yearly/Monthly or Pay-per-use. For the detailed billing standards, see Product Pricing Details.

    Region

    CN-Hong Kong

    Region of the user.

    Select the region where the ECSs reside.

    AZ

    AZ1

    An AZ is a physical location that uses independent power supply and networks. AZs in the same region can communicate with each other over an intranet.

    For low network latency, you are advised to select the same AZ where the ECSs reside.

    Type

    125 MB/s/TiB

    Select 125 MB/s/TiB. After an SFS Turbo file system is created, its type cannot be changed. If you want to change the type, you need to create another file system. Plan the file system type in advance.

    For more information, see File System Types.

    Capacity (TB)

    1.2

    Maximum capacity of the current SFS Turbo file system.

    When the used capacity of the file system reaches this value, no more data can be written to the file system. You need to expand the file system capacity. The capacity of an SFS Turbo file system cannot be reduced. Set an appropriate file system capacity based on your service needs.

    Supported capacity range for a 125 MB/s/TiB SFS Turbo file systems: 1.2 TB to 1 PB

    Enterprise Project

    default

    This parameter shows up only when you use an enterprise account to create an SFS Turbo file system.

    You can manage file systems by project.

    VPC

    VPC: vpc-default

    Subnet: subnet-default (192.168.0.0/24)

    Select the VPC where the ECSs reside and select a subnet (CIDR block).

    To obtain the required information, log in to the ECS console and click the ECS name to go to its summary page. Click the VPC name to the right of the VPC field to open the VPC list and obtain the VPC and subnet information.

    Name

    sfs-turbo-b6a6

    User-defined name of the SFS Turbo file system.

    The name can contain only letters, digits, underscores (_), and hyphens (-). It must start with a letter and can contain 4 to 64 characters.

  5. Click Create Now.
  6. Confirm the file system information and click Submit.
  7. When the creation is complete, go back to the SFS Turbo file system list. If the status of the created file system is Available, the file system has been created. If the status is Creation failed, handle the failure by referring to see Creating an SFS Turbo File System Failed.
  8. In the SFS Turbo file system list, take note of the shared path. It is required when the file system is mounted.

Step 2: Mounting the SFS Turbo File System

After an SFS Turbo file system is created, you need to mount it to ECSs so that they can share the file system.

  1. Log in to the ECS as user root. You can log in to an ECS using the console or a remote access tool (such as PuTTY).

  2. Install the NFS client.

    1. Install the NFS client.
      1. Check whether the NFS software package is installed in the system (CentOS is used in this example).
        rpm -qa|grep nfs
        If information similar to the following is displayed, the NFS software package has been installed and you can go resolve the domain name. If not, run the installation command.
        libnfsidmap
        nfs-utils

      2. Install the client.
        sudo yum -y install nfs-utils
        NOTE:

        The commands require that the ECSs be connected to the Internet. Or, the installation will fail.

  3. Check whether the domain name in the file system shared path can be resolved.

    nslookup <File system domain name>
    NOTE:
    • The file system domain name is in the format of xxx.sfsturbo.internal (variable xxx is the file system ID). You can obtain the domain name from the file system shared path.
    • If the nslookup command cannot be used, you can run yum install bind-utils to install the bind-utils software package.

  4. Mount the NFS file system root directory.

    mkdir <Local path>
    mount -t nfs -o vers=3,timeo=600,noresvport,nolock,tcp <Shared path> <Local path>
    NOTE:

    If any other resources, such as a disk, have been mounted on the desired local path, create a new path. (NFS clients do not refuse repeated mounts. If there are repeated mounts, information of the last successful mount is displayed.)

    Parameter

    Description

    vers

    Version of the SFS Turbo file system. Only NFSv3 is supported currently, so the value is fixed to 3.

    timeo

    Waiting time before the NFS client retransmits a request. The unit is 0.1 second. The recommended value is 600.

    noresvport

    Whether the NFS client uses a new TCP port when it re-establishes a network connection to the NFS server.

    It is strongly recommended that you specify noresvport, which ensures that your file system remains uninterrupted after a network reconnection or recovery.

    nolock

    Whether to use the NLM protocol to lock files on the server. If nolock is specified, the lock is valid only for applications on the same client. It is invalid for applications on any other clients.

    tcp

    Protocol used by the NFS client to send requests to the server. You can use either UDP or TCP.

    <Shared path>

    The type of the SFS Turbo file system is 125 MB/s/TiB, and its shared path is xxx.sfsturbo.internal:/. Variable xxx is the file system ID.

    <Local path>

    A local path on the ECS used to mount the SFS Turbo file system. For example, /local_path.

  5. View the mounted SFS Turbo file system.

    mount -l
    If the command output contains the following information, the file system has been mounted:
    <Shared path> on </local_path> type nfs (rw,vers=3,timeo=600,nolock,addr=)

  6. (Optional) Configure the fstab file to configure file system auto mount upon system startup.

    After a client ECS is restarted, it loses the file system mount information. You can configure auto mount in the fstab file to ensure that the ECS automatically mounts the file system when it restarts.

    1. Open the /etc/fstab file.
    vi /etc/fstab
    At the end of the file, add the SFS Turbo file system information, for example:
    <Shared path> </local_path> nfs vers=3,timeo=600,noresvport,nolock,tcp 0 0

    Replace <Shared path> and </local_path> with actual values. You can obtain the shared path from the Shared Path column of the file system. Other fields are described as follows.

    Parameter

    Description

    <Shared path>

    The mount address of the SFS Turbo file system. It is used when the file system root directory is mounted.

    </local_path>

    A directory created on the ECS for mounting the SFS Turbo file system. Set it to the local path in the mount command used when the file system root directory is mounted.

    nfs

    The file system or partition mount type.

    vers=3,timeo=600,noresvport,nolock,tcp

    Use commas (,) to separate multiple options.

    • vers: The SFS Turbo file system version. Value 3 indicates NFSv3.
    • timeo: The waiting time before the NFS client retransmits a request. The unit is 0.1 second. The recommended value is 600.
    • noresvport: Whether the NFS client uses a new TCP port when it re-establishes a network connection to the NFS server. It is strongly recommended that you specify noresvport, which ensures that your file system remains uninterrupted after a network reconnection or recovery.
    • nolock: Whether to use the NLM protocol to lock files on the server. If nolock is specified, the lock is valid only for applications on the same client. It is invalid for applications on any other clients.
    • tcp: The TCP transmission protocol.

    0

    • An integer greater than 0 means to back up the SFS Turbo file system. A smaller value has a higher backup priority.
    • 0 means not to back up the SFS Turbo file system.

    0

    • This field is set to 1 for the root directory by default. The values for other directories start from 2, and one with a smaller integer is checked earlier than one with a larger integer.
    • 0 means not to check the SFS Turbo file system.
    NOTICE:

    For optimal system performance, configure file system information based on the mount example provided. If needed, you can customize certain mount options. Note that the customization may affect system performance.

    1. Press Esc, enter :wq, and press Enter to save and exit.
    1. (Optional) View the updated content of the /etc/fstab file.
    cat /etc/fstab
    Figure 1 Updated file content

NOTE:

For the detailed mount procedure, see Mounting an NFS File System to Linux ECSs as Root.

Step 3: Using the SFS Turbo File System

After the file system is mounted, you can use it on the ECS as if using an ordinary directory, for example, read data from or write data to the file system.

  1. Remotely connect to the ECS and run the following commands to write data to the SFS Turbo file system:

    # /mnt/sfs is the local mount point (local path).
    mkdir /mnt/sfs/dir1
    touch /mnt/sfs/file1
    echo 'hello sfs' > /mnt/sfs/file2

  2. Remotely connect to the ECS and run the following command to read data from the SFS Turbo file system:

    ls /mnt/sfs

    If information similar to the following is displayed, the SFS Turbo file system can be accessed using NFS.

Helpful Links

After creating and mounting an SFS Turbo file system, you can use the following functions as needed:

  • Backup: You can back up SFS Turbo file systems using CBR. If your file system becomes faulty or encounters a logical error (like accidental deletion, hacker attack, and virus), you can use their backups to quickly restore data.
  • Capacity expansion: If your file system capacity is insufficient, you can increase the file system size by expanding capacity.

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