All Products
Search
Document Center

File Storage NAS:Mount a NAS file system on a DSW instance

Last Updated:Dec 01, 2025

File Storage NAS is seamlessly integrated with Alibaba Cloud Platform for AI (PAI). Configure a NAS file system as a dataset to store data persistently for deployment and training. This topic describes how to quickly mount a NAS file system to a Data Science Workshop (DSW) instance in the console.

Prerequisites

Step 1: Create a file system

If you already have a file system, skip this step.

  1. Log on to the NAS console.

  2. At the bottom of the Overview page, click Create General-purpose NAS File System.

  3. On the General-purpose NAS (Pay-as-you-go) page, configure the following parameters.

    Parameter

    Description

    Region

    The file system and the service must be in the same region. This tutorial uses the China (Hangzhou) region as an example.

    Zone

    Select the zone where the vSwitch is located to avoid cross-zone latency. This tutorial uses Hangzhou Zone F as an example.

    Storage Class

    Premium

    Protocol Type

    NFS

    Recycle Bin

    Enable the recycle bin. After this feature is enabled, deleted files or directories are temporarily stored in the recycle bin. This helps prevent accidental deletion.

    Encryption Type

    Not Encrypted

    Data Backup

    Disable

    Network Type

    VPC.

    VPC

    Select the VPC that you created from the drop-down list.

    vSwitch

    Select a vSwitch that is in the VPC.

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

Step 2: Create a DSW instance

This section describes how to create a DSW instance in a public resource group and configure a NAS file system as a dataset.

  1. Log on to the PAI console.

  2. On the Overview page, select the destination region.

  3. In the navigation pane on the left, click Workspaces. On the Workspaces page, click the name of the workspace that you want to manage.

  4. In the navigation pane on the left of the Workspace Details page, navigate to Model Training > Data Science Workshop (DSW).

  5. On the Instance tab of the Data Science Workshop (DSW) page, click Create Instance.

  6. On the Create Instance page, configure the following key parameters. Leave the other parameters at their default values. For more information, see Create a DSW instance.

    Parameter

    Description

    Instance Name

    Customize the instance name. This tutorial uses test_01 as an example.

    Resource Type

    This tutorial uses Public Resources in pay-as-you-go mode.

    Instance Type

    Select GPU. The instance type name is ecs.gn7i-c8g1.2xlarge.

    Image config

    This tutorial uses the following Alibaba Cloud Image: stable-diffusion-webui-develop:1.0-pytorch2.0-gpu-py310-cu117-ubuntu22.04.

    Mount storage

    Click General-purpose NAS and configure the following key parameters. Keep the default values for other parameters. For more information about datasets, see Create and manage datasets.

    • File System: Select the NAS file system that you created in the preceding steps from the drop-down list.

    • Mount Target: Select a mount target for the file system.

    • File System Path: /

    • Mount Path: /mnt/data/

    Network Information

    Security Group: Select your created security group from the drop-down list.

    Visibility

    Select Visible to the Instance Owner.

  7. Click Yes.

    It takes about 10 minutes to create the DSW instance. After the instance is created, its status changes to Running.

Step 3: Verify the mounting

  1. Return to the DSW page. In the Actions column of the instance that you created, click Open.

  2. In the top menu bar of the DSW instance page, click the Terminal tab to open a terminal.

  3. In the Terminal, run the following command to check whether the NAS dataset is mounted.

    mount | grep nas

    If output similar to the following is returned, the dataset is mounted.

    image.png

    In the output, /mnt/data is the mount path that you specified when you created the DSW instance. Your data and code will be stored persistently as long as the NAS file system and its service are running.

References