If an available Apsara File Storage NAS file system exists in a workspace, the NAS file system is automatically mounted when you create, start, restart, or rebuild a cloud desktop within the workspace. If a NAS file system mounted to a cloud desktop is manually unmounted or if you want to mount a NAS file system to another path, you can manually mount the NAS file system.

Background information

NAS file systems are automatically mounted to cloud desktops in different ways based on the operating systems of the cloud desktops:
  • Windows cloud desktops

    A NAS file system is automatically mounted to drive Z of a cloud desktop. If the workspace to which the cloud desktop belongs is an AD workspace and the NAS file system has the Server Message Block (SMB) access control list (ACL) feature enabled, the NAS file system is automatically mounted by domain users.

  • Linux cloud desktops
    A NAS file system is automatically mounted to the /share/nas/0 directory of a cloud desktop.
    Note For Linux cloud desktops, NAS file systems can only be anonymously mounted when they are automatically mounted. If the workspace to which a Linux cloud desktop belongs is an AD workspace and you want to enable the SMB ACL feature for a NAS file system, you must manually mount the NAS file system.

Manually mount a NAS file system to a Windows cloud desktop

If a NAS file system mounted to a Windows cloud desktop is manually unmounted or if you want to mount a NAS file system to another drive, you can use one of the following methods to manually mount the NAS file system:

  1. Log on to the EDS console and obtain the domain name of the mount target of the NAS file system.
    1. On the Apsara File Storage NAS page, find the NAS file system corresponding to the workspace to which the cloud desktop belongs and click Change Mount Point in the Actions column.
    2. In the dialog box that appears, view and record the domain name of the mount target of the NAS file system.
  2. Log on to the cloud desktop and run the following command to manually mount the NAS file system.
    net use z: \\038f84****-cjc**.cn-hangzhou.nas.aliyuncs.com\myshare

    In the preceding command, 038f84****-cjc**.cn-hangzhou.nas.aliyuncs.com indicates the domain name of the mount target of the NAS file system. You can replace Z with another drive letter.

Manually mount a NAS file system to a Linux cloud desktop

If a NAS file system mounted to a Linux cloud desktop is manually unmounted, or if you want to mount a NAS file system as a domain user and enable the SMB ACL feature, you can use one of the following methods to manually mount the NAS file system:

  1. Log on to the Elastic Desktop Service (EDS) console and obtain the domain name of the mount target of the NAS file system.
    1. On the Apsara File Storage NAS page, find the NAS file system corresponding to the workspace to which the cloud desktop belongs and click Change Mount Point in the Actions column.
    2. In the dialog box that appears, view and record the domain name of the mount target of the NAS file system.
  2. Log on to the cloud desktop and manually mount the NAS file system.
    You can use one of the following methods to manually mount the NAS file system to the Linux cloud desktop based on the account system type of the workspace to which the cloud desktop belongs:
    • Mount the NAS file system as a domain user
      If the workspace to which the cloud desktop belongs is an AD workspace and the NAS file system has the SMB ACL feature enabled, you can mount the NAS file system as a domain user and perform access control. Perform the following steps:
      1. Open the terminal. Make sure that the logon user is a domain user of the AD workspace.
      2. Run the id command to obtain the uid and gid of the domain user.
      3. Run the following command to mount the NAS file system to the specified path:
        sudo mount -t cifs //038f84****-cjc**.cn-hangzhou.nas.aliyuncs.com/myshare /mnt -o vers=2.1,sec=krb5,cruid=880401104,uid=880401104,gid=880400513

        In the preceding command, 038f84****-cjc**.cn-hangzhou.nas.aliyuncs.com indicates the domain name of the mount target of the NAS file system. Replace cruid and uid with the uid obtained in the previous step, and replace gid with the gid obtained in the previous step. /mnt indicates the mount path, which you can replace based on your needs.

      4. Run the mount -l command to view the mount result.
    • Mount the NAS file system as a guest user
      If the workspace to which the cloud desktop belongs is a workspace of the convenience account type, or if NAS file system does not have the SMB ACL feature enabled, you can mount the NAS file system only as a guest user. Perform the following steps:
      1. Open the terminal.
      2. Run the following command to mount the NAS file system to the specified path:
        mount -t cifs //038f84****-cjc**.cn-hangzhou.nas.aliyuncs.com/myshare /mnt -o vers=2.1,guest,uid=0,gid=0,dir_mode=0755,file_mode=0755,mfsymlinks,cache=strict,rsize=1048576,wsize=1048576

        In the preceding command, 038f84****-cjc**.cn-hangzhou.nas.aliyuncs.com indicates the domain name of the mount target of the NAS file system, and /mnt indicates the mount path. You can replace the mount path based on your needs.

      3. Run the mount -l command to view the mount result.