Mounting an NFS File System to ECSs (Windows)
After creating a file system, you need to mount it to ECSs so that they can share the file system.
This section uses Windows Server 2012 as the example OS to describe how to mount an NFS file system. For other versions, perform the steps based on the actual situation.
An SFS Capacity-Oriented file system can use either the NFS or CIFS protocol. It cannot use both protocols.
In this section, ECSs are used as example servers. Operations on BMSs and containers (CCE) are the same as those on ECSs.
Prerequisites
- You have created a file system and have obtained its mount point.
- At least one ECS that is in the same VPC as the file system is available.
- The IP address of the DNS server for resolving the file system domain name has been configured on the ECSs. For details, see Configuring DNS.
Notes and Constraints
You are advised to use CIFS file systems in Windows OS.
SFS Turbo file systems cannot be mounted to Windows ECSs.
General purpose file systems cannot be mounted to Windows ECSs.
Procedure
- Go to the ECS console and log in to the ECS running Windows Server 2012.
- Install the NFS client.
- Click Server Manager in the lower left corner to open Server Manager, as shown in Figure 1.
- Click Add roles and features.
Figure 2 Wizard for adding roles and features
- Click Next as prompted. On the Server Roles page, select Server for NFS.
Figure 3 Selecting Server for NFS
- Click Next. On the Features page, select Client for NFS and click Next. Confirm the settings and then click Install. If you install the NFS client for the first time, after the installation is complete, restart the client and log in to the ECS again as prompted.
Figure 4 Selecting Client for NFS
- Modify the NFS transport protocol.
- Choose Figure 5 Administrative tools
.
- Right-click Client for NFS, choose Properties, change the transport protocol to TCP, and select Use hard mounts.
Figure 6 Services for NFS
Figure 7 Client for NFS properties
- Choose
- Check that the IP address of the DNS server for resolving the file system domain name has been configured on the ECS before mounting the file system. For details, see Configuring DNS. SFS Turbo file systems do not require domain name resolution.
- Run the mount command in the Command Prompt of the Windows Server 2012 (X is a free drive letter). Select the ECS that is in the same VPC as the file system to mount the file system.
For SFS Capacity-Oriented file systems: mount -o nolock Mount point X:
- A free drive letter is one that is not in use, such as drive letter E or X.
You can move the cursor to the mount point and click next to it to copy the mount point. For details, see Figure 8. If the information shown in Figure 9 is displayed, the mount is successful.
- After the file system is mounted successfully, view the mounted file system in the This PC window.
If the mount fails or times out, rectify the fault by referring to Troubleshooting.
Figure 10 Successful mount
To distinguish different file systems mounted on an ECS, you can rename file systems by right-clicking a file system and choose Rename.
Troubleshooting
If a file system is mounted to a Linux ECS and a Windows ECS, on the Windows ECS, you cannot write data to the files created by the Linux ECS. To address this problem, modify the registry to change both UID and GID values to 0 for NFS accesses from Windows. This section uses Windows Server 2012 as an example. Do as follows:
- Choose Start > Run and enter regedit to open the registry.
- Enter the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default directory.
Figure 11 Entering the directory
- Right-click the blank area and choose New > DWORD Value from the shortcut menu. Set AnonymousUid and AnonymousGid to 0. Figure 12 shows a successful operation.
- After the registry is modified, restart the server for the modification to take effect.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot