All Products
Search
Document Center

Serverless App Engine:Configure NAS storage

Last Updated:Sep 12, 2025

Data in a container is typically lost when the container is destroyed. This can negatively affect production environments. NAS is ideal for high-performance computing (HPC) and data sharing. You can mount a NAS file system to a Serverless App Engine (SAE) application instance for data persistence and to share data between application instances.

Prerequisites

Procedure

Configure NAS storage when you create an application

  1. On the SAE Application List page, select the destination region and namespace at the top of the page, and then click Create Application.

  2. In the Application Basic Information wizard, set the required information and click Next: Advanced Settings.

  3. Expand the Persistent Storage section and configure the parameters.

    1. You can turn on the Enable NAS File Storage switch.

    2. In the NAS File System row, select a file system to mount from the drop-down list, and set Mount Source, Mount Directory, Container Path, and Permission.

      Note
      • The Mount Directory must be the root directory / or a subdirectory whose name does not start with a forward slash (/).

      • The value of the Container Path parameter must be unique. If you specify multiple mount paths, the paths cannot be nested. For example, you cannot specify both /tmp and /tmp/nas.

      • To add a mount path, click +Add. You can add up to 10 mount paths.

  4. Click Create Application.

Configure NAS storage when you deploy an application

Warning

After you redeploy an application, the application is restarted. To prevent unpredictable errors such as business interruptions, we recommend that you deploy applications during off-peak hours.

The procedure that can be performed to update an application varies based on the number of instances in the application. This section provides an example on how to configure the required features for an application in which the number of instances is greater than or equal to 1. For information about how to update an application in which the number of instances is 0, see Update an application.

  1. In the SAE Application List, select the destination region and namespace at the top, and then click the ID of the target Application to open the application details page.

  2. On the Basic Information page of the target application, click Deploy Application.

  3. Expand the Persistent Storage section and configure the parameters.

    1. You can turn on the Enable NAS File Storage switch.

    2. In the NAS File System row, select a file system to mount from the drop-down list, and set Mount Source, Mount Directory, Container Path, and Permission.

      Note
      • The Mount Directory must be the root directory / or a subdirectory whose name does not start with a forward slash (/).

      • The value of the Container Path parameter must be unique. If you specify multiple mount paths, the paths cannot be nested. For example, you cannot specify both /tmp and /tmp/nas.

      • To add a mount path, click +Add. You can add up to 10 mount paths.

  4. After completing the configuration, click OK.

Unmount the NAS file system

Warning

After you redeploy an application, the application is restarted. To prevent unpredictable errors such as business interruptions, we recommend that you deploy applications during off-peak hours.

If you no longer need a mounted NAS file system, you can unmount it. Unmounting a NAS file system from the SAE console does not delete the data stored in it. For the procedure, see Configure NAS storage when you deploy an application. Follow Step 4, turn off the Enable NAS Storage switch, and click OK.

Verify the result

You can use one of the following methods to verify that the NAS file system is mounted:

  • This depends on the change details.

    If the creation or deployment is successful and no anomalous activity occurs on the new instances, the NAS file system is mounted.

    sae挂载nas成功

  • From the perspective of the container.

    In the webshell, run the following command to check for NAS mount information in the application:

    cat /proc/mounts | grep nfs

    If the following information is displayed, the NAS file system is mounted.

    成功挂载nas存储

  • You can evaluate from a business perspective.

    In the webshell, perform operations on the mounted NAS path. If the path can be found in the NAS file system, the mount is successful.

FAQ

How do I view the content of a NAS file system?

You cannot use console tools to view the content of a NAS file system. To view the content, you must mount the file system to an SAE application or an ECS server. For more information, see the following documents:

Can I use NAS to store logs?

Do not use NAS for log persistence. If multiple clients write to the same file at the same time, concurrent access conflicts and performance bottlenecks can occur.

For log scenarios, we recommend that you use Simple Log Service (SLS) for data persistence. For more information, see Configure log collection to SLS.