Mount and Unmount SMB Protocol CFS on Single BCC

CFS

  • Updates and Announcements
    • Function Release Records
    • Product Announcement
      • Announcement on CFS Metric Adjustments
  • Product Description
    • Product Introduction
    • Basic concepts
    • Product features
    • Product specifications
    • Usage Limits and Recommendations
    • Selection Guide
      • How to Choose Between CFS and PFS
      • How to Choose Between CFS, BOS and CDS
    • Application scenarios
  • Product pricing
    • Pay-as-you-go
    • Storage package billing
    • Insufficient balance reminders and debt handling
    • Billing Cases
  • Quick Start
    • Getting Started Overview
    • Quick start (Linux)
    • Quick start (Windows)
  • Operation guide
    • Activate Service
    • Manage File System
      • Create file system
      • Delete a file system
      • View file system details
      • Set File System Capacity Upper Limit
    • Mount and Access
      • Add mount target
      • Mount and Unmount CFS on BCC
        • Mount and Unmount on Linux System
          • Mount and Unmount SMB Protocol CFS on Single BCC
          • Batch mounting and unmounting NFS CFS on multiple BCC
          • Mounting and unmounting NFS CFS on a single BCC
        • Mount and Unmount SMB Protocol CFS on Windows System
        • Mount CFS File System When Purchasing New BCC
      • Using CFS in CCE
    • Permission Group Management
    • Identity and access management
    • Data encryption
    • Management Tags
    • Backup
    • Monitor and Alarm
      • View monitoring
      • Alarm management
      • Metric definition
    • Cloud Audit
  • Typical Practices
    • Set Different User Permissions for Different Directories
    • Using File Systems Across Regions Or Accounts
    • Use SFTP to Upload and Download CFS File System Data
    • Use Rsync to Sync From Old File System to CFS File System
    • Best Practices for Managing CFS with Terraform
    • Performance Testing Methods
      • Linux System Performance Testing Methods
      • Windows System Performance Testing Methods
  • API Reference
    • API Function Update Records
    • API Overview
    • Interface Overview
    • General Description
    • Service domain
    • Error code
    • File System Related Interfaces
      • Create file system
      • Update file system
      • Query file system
      • Query mount client
      • Drop file system
      • Update file system tags
    • mount target Related Interfaces
      • Create mount target
      • Query mount targets
      • Delete mount target
    • Permission Group-related APIs
      • Create Permission Group
      • Update permission group
      • Query Permission Groups
      • Delete permission group
      • Create permission group rules
      • Update permission group rules
      • Query permission group rules
      • Delete permission group rule
    • Data type
  • Go-SDK
    • Overview
    • Initialization
    • File system
    • Mount target
    • Error handling
  • FAQs
    • Common Questions Overview
    • General Problems
    • Billing Problems
    • NFS protocol questions
    • SMB Protocol Issues
  • Service Level Agreement (SLA)
    • CFS Service Level Agreement (SLA)
All documents
menu
No results found, please re-enter

CFS

  • Updates and Announcements
    • Function Release Records
    • Product Announcement
      • Announcement on CFS Metric Adjustments
  • Product Description
    • Product Introduction
    • Basic concepts
    • Product features
    • Product specifications
    • Usage Limits and Recommendations
    • Selection Guide
      • How to Choose Between CFS and PFS
      • How to Choose Between CFS, BOS and CDS
    • Application scenarios
  • Product pricing
    • Pay-as-you-go
    • Storage package billing
    • Insufficient balance reminders and debt handling
    • Billing Cases
  • Quick Start
    • Getting Started Overview
    • Quick start (Linux)
    • Quick start (Windows)
  • Operation guide
    • Activate Service
    • Manage File System
      • Create file system
      • Delete a file system
      • View file system details
      • Set File System Capacity Upper Limit
    • Mount and Access
      • Add mount target
      • Mount and Unmount CFS on BCC
        • Mount and Unmount on Linux System
          • Mount and Unmount SMB Protocol CFS on Single BCC
          • Batch mounting and unmounting NFS CFS on multiple BCC
          • Mounting and unmounting NFS CFS on a single BCC
        • Mount and Unmount SMB Protocol CFS on Windows System
        • Mount CFS File System When Purchasing New BCC
      • Using CFS in CCE
    • Permission Group Management
    • Identity and access management
    • Data encryption
    • Management Tags
    • Backup
    • Monitor and Alarm
      • View monitoring
      • Alarm management
      • Metric definition
    • Cloud Audit
  • Typical Practices
    • Set Different User Permissions for Different Directories
    • Using File Systems Across Regions Or Accounts
    • Use SFTP to Upload and Download CFS File System Data
    • Use Rsync to Sync From Old File System to CFS File System
    • Best Practices for Managing CFS with Terraform
    • Performance Testing Methods
      • Linux System Performance Testing Methods
      • Windows System Performance Testing Methods
  • API Reference
    • API Function Update Records
    • API Overview
    • Interface Overview
    • General Description
    • Service domain
    • Error code
    • File System Related Interfaces
      • Create file system
      • Update file system
      • Query file system
      • Query mount client
      • Drop file system
      • Update file system tags
    • mount target Related Interfaces
      • Create mount target
      • Query mount targets
      • Delete mount target
    • Permission Group-related APIs
      • Create Permission Group
      • Update permission group
      • Query Permission Groups
      • Delete permission group
      • Create permission group rules
      • Update permission group rules
      • Query permission group rules
      • Delete permission group rule
    • Data type
  • Go-SDK
    • Overview
    • Initialization
    • File system
    • Mount target
    • Error handling
  • FAQs
    • Common Questions Overview
    • General Problems
    • Billing Problems
    • NFS protocol questions
    • SMB Protocol Issues
  • Service Level Agreement (SLA)
    • CFS Service Level Agreement (SLA)
  • Document center
  • arrow
  • CFS
  • arrow
  • Operation guide
  • arrow
  • Mount and Access
  • arrow
  • Mount and Unmount CFS on BCC
  • arrow
  • Mount and Unmount on Linux System
  • arrow
  • Mount and Unmount SMB Protocol CFS on Single BCC
Table of contents on this page
  • Prerequisites
  • Mounting steps
  • Step I: Obtain domain name of a mount target
  • Step II: Install SMB client
  • Step III: Mount SMB file system
  • Step IV: View mounted SMB file systems
  • Unmounting steps

Mount and Unmount SMB Protocol CFS on Single BCC

Updated at:2025-11-11

When you create a CFS SMB file system, you must mount it on Baidu Cloud Compute (BCC) to provide shared access across multiple BCC instances. This document details the process for mounting a CFS SMB file system using a Linux BCC instance.

Prerequisites

  1. The target BCC instance (Linux) has been created for mounting the CFS file system. For BCC creation methods, refer to: Quick Configuration of Linux Cloud Servers.
  2. An SMB file system has been created with a mount target added. For detailed steps, refer to: Create File System, Add Mount Target.

Mounting steps

Step I: Obtain domain name of a mount target

Once the mount target has been created, you can start using the file system. Click the Manage button in the operation toolbar of the file system list to access the mount target information page, as demonstrated below:

image.png

After logging into the virtual machine or container, use the mount target’s domain name to perform file system operations.

Step II: Install SMB client

Most Linux operating systems do not include an SMB client by default, so you need to manually install the SMB client before mounting the file system. Log in to Baidu Cloud Compute (BCC) and execute the command to install the SMB client.

  • For CentOS/RHEL OS, run the following command:
Shell
1yum install cifs-utils
  • For Ubuntu/Debian OS, run the following command:
Shell
1apt-get install cifs-utils

Step III: Mount SMB file system

Execute the following command to mount an SMB file system:

Shell
1mount -t cifs -o vers=3.0,guest,mfsymlinks,rsize=1048576,wsize=1048576,cache=strict
2 //<Domain name of a mount target>/cfs <client local path>

Description:

  • <Domain name of a mount target> is available in the file system’s mount target list (refer to Step I).
  • <Client local path> refers to the client’s local path for mounting. It must be an absolute path beginning with / (e.g., /mnt/cfs) and must already exist prior to mounting.

Parameters in the command are explained in the table below:

Option Description
vers The SMB protocol supports major versions including 1.0, 2.0, 2.1, and 3.0. Because some advanced SMB versions are not fully supported by the Linux kernel, version 3.0 is recommended (and is used by default when the "vers" option is not specified).
rsize Specify the maximum byte size a client’s file read request can retrieve. Setting this value too low will reduce read throughput. Recommended value: 1048576.
wsize Specify the maximum byte size a client’s file write request can transmit. If this value is too low, write throughput will be negatively affected. Recommended value: 1048576.
guest SMB now supports guest mounting for identity authentication and file access.
mfsymlinks Symbolic link functionality is supported.
cache Configure whether to use the SMB client cache, with options: strict and none. If not configured, the default value is strict, meaning the client cache will be used.

Example:

Shell
1mount -t cifs -o vers=3.0,guest,mfsymlinks,rsize=1048576,wsize=1048576,cache=strict
2//cfs-***.lb-b768ef66.cfs.bj.baidubce.com/cfs /mnt/smb_dir

Step IV: View mounted SMB file systems

After mounting, use the following command to view mounted file systems:

Shell
1cat /proc/mounts

To view the file system capacity information, use the following command:

Shell
1df -h

Unmounting steps

  1. Sign in to the Baidu Cloud Compute (BCC) where the CFS file system is mounted.
  2. Use the "umount" command to detach the file system.
Shell
1umount <target path>
2 ## Among them, <target path> refers to the local path of the CFS file system to be unmounted
  1. Execute the mount -l command to check the unmounting result. If the mounted CFS file system information is not found in the echo, it means the file system's mount directory has been successfully unmounted.

Previous
Add mount target
Next
Batch mounting and unmounting NFS CFS on multiple BCC