This topic describes how to manage Server Message Block (SMB) shares in the on-premises file gateway console. You can create, delete, disable, and modify SMB shares, configure Active Directory (AD), and add SMB users.
Prerequisites
A cache has been added. For more information, see Add a cache.
A cloud resource has been attached. For more information, see Bind a cloud resource.
Background information
SMB is a network file sharing protocol that uses a client/server model.
Cloud Storage Gateway acts as an SMB server to provide file sharing services. When a client on a Windows operating system accesses the gateway, Cloud Storage Gateway receives the client's request and returns a response.
To use the Cloud Storage Gateway SMB service, you must first configure a shared folder on the gateway, specify the users who can access the folder, and set their access permissions.
Create an SMB share
In a browser, enter
https://<IP address of the file gateway>to access the on-premises file gateway console.Enter your username and password and click Confirm.
Select SMB and click Create.
In the Create SMB dialog box, specify the following configuration.
Parameter
Description
Share Name
The name of the SMB share.
Read-only Users
The list of users who have read-only access to the SMB share.
Read/write Users
The list of users who have read and write access to the SMB share.
Enabled
Enables the SMB share.
To temporarily disable this SMB share, select No.
Discoverable
Specifies whether the share can be discovered in Network Neighborhood.
Data Access Mode
Includes cache mode and replication mode.
Replication Mode: All data is saved in two copies. One copy is stored in the local cache and the other is stored in Object Storage Service (OSS).
Cache Mode: The local cache stores all metadata and frequently accessed user data. The full data is stored in OSS.
Enable Reverse Sync
Synchronizes metadata from OSS back to the local gateway. This is suitable for disaster recovery, data restoration, and data sharing scenarios.
NoteDuring a reverse synchronization process, the system scans all objects in the bucket. If the number of objects is large, you are charged for OSS API calls. For more information, see OSS Pricing.
Bucket Name
Select a created bucket.
Path Prefix
Enter a subdirectory of the bucket.
The subdirectory name can contain only letters and digits.
NoteStarting from version 1.0.38, you can map the root directory of the file system to a subdirectory of an OSS bucket for access isolation.
The subdirectory can be an existing directory or a new directory in the OSS bucket. After the share is created, this subdirectory serves as the root directory. All subsequent files and folders are created in this directory.
Use Metadata
Separates the data disk from the metadata disk. The metadata disk is used to store metadata of the shared folder.
If you select Yes, select the corresponding Metadata and Data.
If you select No, select the corresponding Cache Disk Path.
NoteOnly users on the whitelist can use this feature.
Ignore Delete
File deletion operations are not synchronized to OSS to prevent accidental deletions. The full data is retained in OSS.
Sync Delay
Set a Sync Delay. After a file is closed, the upload is delayed for a period of time. This prevents frequent local modifications from causing OSS fragmentation. The default value is 5s and the maximum value is 120s.
Max Write Speed
The maximum write speed is 1280 MB/s. The default value is 0, which indicates that the speed is not limited.
Max Upload Speed
The maximum upload speed is 1280 MB/s. The default value is 0, which indicates that the speed is not limited.
NoteIf you limit the speeds, the maximum upload speed cannot be less than the maximum write speed.
Optimize Fragments
For applications that perform frequent random small I/O reads and writes, enabling this setting can improve performance. Select this option with caution based on your scenario.
Fast Cache Reclaim
Real-time cache reclamation. This is suitable for scenarios where data is backed up to the cloud.
About AD
Active Directory (AD) is a directory service that uses a standard application protocol to access and change directory data in an Internet Protocol (IP) network.
You can join an AD domain only after you configure the DNS server.
Only one type of user, either an AD domain user or a local user, can be active at a time. When you join or leave an AD domain, the user permissions configured for the SMB share are automatically deleted.
The AD feature supports the 64-bit Windows Server 2016 Datacenter and Windows Server 2012 R2 Datacenter editions.
Configure AD
Set up the DNS server.
In the on-premises gateway console, click About.
In the Network Configuration section, click Update DNS.
In the Update DNS dialog box, add a DNS server and click the Confirm button.
In the DNS Server field, enter the IP address of the AD server that parses the AD domain name.
Join an AD domain.
Select .
In the Windows AD section, click Join AD.
In the Join AD dialog box, configure the following settings and click OK.
Server IP Address: Enter the IP address of the AD server.
Username: Enter the username of the administrator.
Password: Enter the password of the administrator.
After the connection is established, the Connected parameter in the Windows Active Directory (AD) section changes to Yes.
NoteAfter you join the AD domain, the local user permissions configured for the SMB share are removed.
CSG does not support multiple AD domains for a gateway. For example, you can configure either a parent domain or a child domain for a gateway, but not both.
Add an SMB user
If the gateway has not joined an AD domain, you must create SMB users to access Cloud Storage Gateway. If the gateway has joined an AD domain, the SMB Users page does not display user information. In this case, you must query the domain user information from the AD domain server.
In the on-premises gateway console, select .
Click Create.
In the Add SMB User dialog box, set the name and password.
Click OK to finalize the creation.
Related operations
On the SMB page, you can also perform the following tasks.
Operation | Description |
Disable an SMB share | On the SMB page, click the switch in the upper-left corner to disable the SMB sharing service. To disable a single SMB share: On the SMB Shares tab, find the target SMB share, click Settings, and set the Enable option to No. |
Delete an SMB share | On the SMB Shares tab, find the target SMB share and click Delete to delete the share. Warning
|
Modify an SMB share | On the SMB Shares tab, find the target SMB share and click Settings or Advanced Settings to modify the share. |
Refresh cache | On the SMB Shares tab, find the target SMB share and click Cache Refresh. |
Delete an SMB user | On the SMB Users tab, find the target user and click Delete. |
Close the connection | On the AD tab, click Disconnect. |