This topic describes how to access a Server Message Block (SMB) share of a gateway from a client that is installed on a Windows Elastic Compute Service (ECS) instance.
Prerequisites
An SMB share is created. For more information, see Create a share.
You can mount a maximum of 16 SMB shares to a file gateway. The maximum number of SMB shares supported by different types of gateways varies due to differences in CPU and memory specifications. For more information, see Specifications.
After shares are mounted, the displayed maximum capacity of file systems varies based on the file gateway specifications. For more information, see Specifications of cloud file gateways.
For a gateway V1.0.35 or later, if no user is created for the gateway, the client accesses SMB shares as a public user by default. However, if you have added users, you must grant read and write or read-only permissions to users before the users can access the SMB shares. For more information, see Configure an SMB share.
After you change users' permissions on an SMB share, run the net use /delete < share path > command to delete the share in the Windows operating system. You do not need to restart the client.
Procedure
Log on to the ECS console.
Connect to your ECS instance that runs Windows. For more information, see Connect to an instance.
Open This PC and select Map network drive.
Select a drive to mount the SMB share.
IPv4: Enter the mount target that uses IPv4 in the Folder field.
IPv6: Enter the mount target that uses IPv6 in the Folder field.
NoteYou can mount a share over IPv6 only in the China (Hohhot) region. Make sure that the virtual private cloud (VPC) and vSwitch of the gateway support IPv6.
If you mount a share by using IPv6, make sure that an IPv6 address is configured for the client on the ECS instance.
If the VPC and vSwitch of an existing gateway support IPv6 and you enable IPv6 for the gateway, the second row displays an IPv6 mount target. By default, gateways created in this VPC support IPv6.
The mount target consists of the IP address of the gateway and the name of the SMB share. Specify the mount target based on your business requirements. To query the mount target of a gateway, log on to the CSG console and navigate to the Share page of the gateway. Mount targets use IPv4 by default.
NoteIf you use Windows 2016 or later and encounter the error shown in the following figure when you mount a share, run the
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters /f /v AllowInsecureGuestAuth /t REG_DWORD /d 1
command. This grants anonymous access to the client.Click OK and enter your username and password of the Common Internet File System (CIFS).
If you have joined an Active Directory (AD) domain, prefix the username with the domain in the <domain><username> format.
After you mount the SMB share, check the mount result.
If a window similar to the following one appears, the SMB share is mounted.
Access the SMB share.
After an SMB share is mounted, you can access the SMB share in the same way that you access a local directory. If you have write permissions on the SMB share, you can write data to the SMB share. If you have read-only permissions on the SMB share, you can only read data from the SMB share. For more information, see Configure an SMB share.
NoteA share of a gateway is synchronized with the Object Storage Service (OSS) bucket associated with the share. When you manage a share, the changes to the share are also applied to the associated OSS bucket.
If you encounter an error when you mount a share, see What can I do if I cannot mount an SMB share on Windows Server 2019?