All Products
Search
Document Center

File Storage NAS:Mount an NFS file system (General-purpose NAS)

Last Updated:Jun 20, 2026

Because Windows systems have limited compatibility with the NFS protocol, you should mount an NFS file system on a Windows system only when you need to share data across different operating systems. This topic describes how to mount an NFS file system on an Elastic Compute Service (ECS) instance that runs Windows.

Prerequisites

  • You have created a General-purpose NAS file system that uses the NFS protocol and obtained the mount target address of the file system. For more information, see Create a General-purpose NAS file system in the console.

  • An ECS instance that runs Windows is available in the same region as the file system. For more information, see Create an ECS instance.

    Click to view the Windows operating systems supported by General-purpose NAS file systems that use the NFS protocol

    Operating system

    Version

    Windows Server 2025

    • Windows Server 2025 Datacenter 64-bit (Simplified Chinese)

    • Windows Server 2025 Datacenter 64-bit (English)

    Windows Server 2022

    • Windows Server 2022 Datacenter 64-bit (Simplified Chinese)

    • Windows Server 2022 Datacenter 64-bit (English)

    Windows Server 2012

    • Windows Server 2012 R2 Datacenter 64-bit (Simplified Chinese)

    • Windows Server 2012 R2 Datacenter 64-bit (English)

    Windows Server 2016

    • Windows Server 2016 Datacenter 64-bit (Simplified Chinese)

    • Windows Server 2016 Datacenter 64-bit (English)

    Windows Server 2019

    • Windows Server 2019 Datacenter 64-bit (Simplified Chinese)

    • Windows Server 2019 Datacenter 64-bit (English)

  • The ECS instance and the mount target are in the same VPC.

Note

Extreme NAS file systems cannot be mounted on Windows operating systems using the NFS protocol.

Step 1: Install the NFS client

  1. Connect to the ECS instance. For more information, see Connect to an ECS instance.

  2. Open Server Manager.

  3. Choose .

  4. You can follow the instructions in the Add Roles and Features Wizard to install the NFS client.

    1. On the Server Roles page, go to and select Server for NFS.

    2. On the Features page, select Client for NFS.

  5. Restart the ECS instance.

  6. Open Command Prompt and run the mount command.

    If the following information is returned, the NFS client is installed.

    C:\Users\Administrator>mount
    Local    Remote                                Properties
    -------------------------------------------------------------------------------
    --

Step 2: Mount the General-purpose NAS file system that uses the NFS protocol

You can mount a General-purpose NAS file system that uses the NFS protocol either manually or automatically. Manual mounts are temporary and must be re-established each time the server starts or restarts. Automatic mounts are persistent. To ensure the file system remains accessible after a server restart, we recommend that you configure an automatic mount after you successfully mount the file system manually.

Manually mount the General-purpose NAS file system that uses the NFS protocol

  1. On the Windows client, run the following command to mount the General-purpose NAS file system that uses the NFS protocol.

    mount -o nolock -o mtype=hard -o timeout=60 \\file-system-id.region.nas.aliyuncs.com\! Z:

    Replace the drive letter Z and the mount target address file-system-id.region.nas.aliyuncs.com with your actual values. For more information about mount target addresses, see Manage mount targets.

    Note
  2. Run the mount command to check the mount status.

    After the mount is complete, verify that the returned information includes mount=hard, locking=no, and a timeout parameter >=10. If it does not, the mount operation has failed.

    If the output is not as expected, run the net use <drive letter> /delete command to unmount the file system. Then, remount the file system by following the instructions in Step 1.

    C:\Users\Administrator>mount
    Local    Remote                              Properties
    Z:    \\29xxx.nas~ UID=-2, GID=-2
                                rsize=1048576, wsize=1048576
                                mount=hard, timeout=10.0
                                retry=1, locking=no
                                fileaccess=755, lang=GB2312-80
                                casesensitive=no
                                sec=sys
  3. Double-click the This PC icon to view the new shared file system.

    Create a folder and a file in the shared file system to verify that you can perform operations on the file system.

    After the mount is complete, the mapped NAS network drive appears under Network locations in This PC.

(Optional) Automatically mount the General-purpose NAS file system that uses the NFS protocol

To automatically mount the NFS file system when the instance restarts, configure the c:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\auto_mount.bat file on the Windows ECS instance.

  1. In the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp directory of the Windows system, create a script file named nas_auto.bat and add the following content.

    Example:

    mount -o nolock -o mtype=hard -o timeout=60 \\file-system-id.region.nas.aliyuncs.com\! Z:

    Replace the drive letter z and the mount target address file-system-id.region.nas.aliyuncs.com with your actual values. For more information about mount parameters, see Mount parameters.

  2. Create a scheduled task.

    1. Open Control Panel, click System and Security, and then under Administrative Tools, click Schedule Tasks.

    2. On the Task Scheduler page, you can choose Create Job.

    3. On the General tab, enter a Name for the scheduled task, and select Run whether user is logged on or not and Run with highest privileges.

      Important

      If you use Windows Server 2016, you must select Run only when user is logged on for the automatic mount configuration to take effect.

      In the Security options section of the General tab, select Run whether user is logged on or not (W), select the Run with highest privileges (I) check box, and from the Configure for (C) drop-down list, select Windows Vista™, Windows Server™ 2008.

    4. On the Triggers tab, click New. From the Begin the task list, select At log on. In the Advanced settings section, select Enabled and click OK.

    5. On the Actions tab, click New, and select Start a program from the Action list. In the Program/script field, select the nas_auto.bat file that you created in Step 1 and click OK.

    6. Click the Conditions tab. In the Network section, select Start only if the following network connection is available. Select Any connection from the drop-down list.

    7. Click the Settings tab. Select If the running task does not end when requested, force it to stop. Select Do not start a new instance from the If the task is already running, then the following rule applies drop-down list.

    8. Click OK.

    9. Restart the ECS instance to validate the result.

      Important

      Restarting the ECS instance interrupts services. Restart the instance during off-peak hours.

      • Check the status of the scheduled task

        The scheduled task is running as expected if you see the following status in Task Scheduler: the status of the scheduled task named nas is Ready, the trigger is At log on of any user, and the last run result is The operation completed successfully. (0x0).

      • Run the mount command to check the mount status.

        After the mount is complete, verify that the returned information includes mount=hard, locking=no, and a timeout parameter >=10. If it does not, the mount operation has failed.

        If an issue occurs, open the nas_auto.bat script and replace its content with the script from Step 1.

FAQ

References