Quick start (Windows)

更新时间:
复制 MD 格式

Create an SMB file system in the NAS console and mount it on a Windows Server 2019 ECS instance within a VPC to upload and download data.

Prerequisites

Video tutorial

This video shows how to use NAS with a Windows Server 2019 ECS instance.

Step 1: Create a file system and mount target

  1. Log on to the NAS console.

  2. On the Overview page, in the File System Selection Guide table, click Create under General-purpose NAS.

  3. On the Create pane, configure the following parameters. Use default values for other parameters or customize as needed.

    All parameter details are in Create a file system.

    Parameter

    Description

    Region

    Select China (Hangzhou).

    Zone

    Select China (Hangzhou) Zone F. The zone must be the same as the zone of the ECS instance.

    Protocol Type

    Select SMB.

    Network Type

    Select VPC.

    VPC

    Select the same VPC as your ECS instance.

    vSwitch

    Select a vSwitch in the selected VPC.

  4. Click Buy Now and follow the on-screen instructions to complete the purchase.

    After the file system is created, a mount target is automatically generated and associated with the default VPC permission group. You can also Create a permission group or Create a mount target for custom configurations.

  5. Return to the NAS console, select File System > File System List, and click the file system that you just created.

  6. On the file system details page, click Mount Targets.

  7. In the Mount Target list's Mount Command column, copy the mount command for later use.

    image.png

Step 2: Mount the file system

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

  2. Open Command Prompt and run the following command to allow insecure guest authentication on the client.

    REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters /f /v AllowInsecureGuestAuth /t REG_DWORD /d 1
  3. Enable the Workstation service.

    1. Press Win+R to open the Run dialog box, enter services.msc, and click OK.

    2. In Services, find Workstation and set its running status to Running and startup type to Automatic.

      Workstation

  4. Enable the TCP/IP NetBIOS Helper service.

    1. Open Control Panel, select , and then click the network that the host is connected to.

    2. In the Status dialog box, click Properties, and then double-click Internet Protocol Version 4 (TCP/IPv4).

    3. In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box, click Advanced.

    4. In the Advanced TCP/IP Settings dialog box, click the WINS tab, select Enable NetBIOS over TCP/IP, and click OK.

      Enable NetBIOS over TCP/IP

    5. Press Win+R to open the Run dialog box, enter services.msc, and click OK.

    6. Find the TCP/IP NetBIOS Helper service, set its status to Running, and set its startup type to Automatic.

      TCP/IP NetBIOS Helpe

  5. Open Command Prompt and run the mount command you copied in Step 1.

    Note

    The default drive letter in the mount command is Z. Replace the drive letter as needed.

  6. Run the net use command to verify the mount.

    The following output confirms the mount succeeded.

    Mount resultIf the mount fails, Troubleshoot file system mount failures.

Step 3: Use the file system

Access the mounted file system from your ECS instance like a local directory.

  1. Connect to the ECS instance and run the following commands to access the NAS file system.

  2. Enter the mounted drive, create directories, and add a file. This example uses drive Z. Replace the drive letter as needed.

    Z:
    mkdir dir1
    mkdir dir2
    echo 'some file content' > file2
    dir
  3. This output confirms access to the NAS SMB file system.

    1