NAS is a storage service that offers you a distributed file system and shared storage across multiple ECS instances. This topic describes the process of mounting an NAS file system on Windows Server 2012 R2.

Prerequisites

Before you can mount a NAS file system to a Windows instance, you must complete the following actions:

  • Follow Step 2. Create an instance to create a Windows ECS instance. In this example:

    • The region is EU Central 1 (Frankfurt).
    • The image is Windows 2012 R2 Data Centre Edition.
    • The network type must be VPC.
  • Create a file system and add a mount point.

    1. Activate the NAS service.

    2. Log on to the NAS console.

    3. Buy a storage package. Follow these steps:

      1. In the left-side navigation pane, click Storage Package.

      2. Click Buy Storage Package.

      3. On the NAS Storage Package page, select the Region (EU Central 1 is selected in this example), Capacity, and the duration of the package.

    4. Create a file system. Follow these steps:

      1. In the NAS console, from the left-side navigation pane, click File System List.
      2. Select the EU Central 1 (Frankfurt) region.
      3. Click Create File System.
      4. Specify the specifications of the file system and bind the storage package to it.

      5. Click OK.
    5. Add a mount point.

      In this example, select VPC as the mount point type.

    6. In the file system list, click the file system ID, and view the Mount Address of the new mount point. You will use the mount address to mount the file system on the Windows instance.

Procedure

You can now mount the mount point on a server with Windows 2012 R2 Data Centre Edition. This solution works for most versions of Windows with NFS Client installed.

  1. Connect to a Windows instance.

  2. Install the NFS Client on the instance.

    1. Click the Server Manager icon.

    2. From the upper menu, select Manage > Add Roles and Features.

    3. Follow the Add Roles and Features Wizard to finish the installation.

      • Under the Server Roles tab, select Server For NFS.

      • Under the Features tab, select Client for NFS.

    4. Restart the server within the guest operating system.

    5. Start Command Prompt and run mount. If the following result is returned, the Client for NFS has been installed.

  3. Run the following command to mount the NFS mount point as a drive.

    mount -o nolock \\11xxxxxxxx9-wxx88.eu-central-1.nas.aliyuncs.com\! h:
    
    Where 11xxxxxxxx9-wxx88.eu-central-1.nas.aliyuncs.com is the mount address that we have created.

  4. Check the shared drive from the This PC of the instance.

  5. Test creation of a folder and a text file inside the newly created folder.



Troubleshooting

If you get a file handle error, check the Registry entries in HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > ClientForNFS > CurrentVersion > User > Default > Mount. The value of Locking must be 1.



You can also set GID and UID by creating the Registry entries:

  1. Go to HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > ClientForNFS > CurrentVersion > Default.

  2. Right-click a blank area, and then select New > DWORD(32bit) to add the following Registry entries.

    • AnonymousGID: Set the value to 0.
    • AnonymousUID: Set the value to 0.

  3. Start Command Prompt and run mount to check the UID and GID.