All Products
Search
Document Center

Apsara File Storage NAS:FAQ about mounting

Last Updated:Apr 03, 2024

This topic provides answers to some frequently asked questions (FAQ) about the mounting of NAS file systems.

If you have any feedback or questions, contact NAS technical support by clicking the button below.

NAS Technical Support

Which operating systems and file system protocols are supported by the mount feature?

You can mount NFS file systems on Linux or Windows. You can also mount SMB file systems on Linux or Windows. To mount a file system on a Windows or Linux Elastic Compute Service (ECS) instance, log on to the ECS instance and run a mount command. For more information, see Mount an SMB file system on a Windows ECS instance, Mount a General-purpose NFS file system on a Windows ECS instance, and Mount an SMB file system on a Linux ECS instance.

Can I mount a file system on an ECS instance that resides in the classic network or a different virtual private cloud (VPC) by using the NAS console?

No, you cannot mount a file system on an ECS instance that resides in the classic network or a different VPC by using the NAS console.

To mount a file system on an ECS instance by using the NAS console, the file system and the ECS instance must reside in the same VPC. To mount a file system on an ECS instance that resides in the classic network or a different VPC, go to the Cloud Assistant page in the ECS console and follow the instructions. For more information, see Mount a NAS file system on multiple ECS instances at a time.

Note

When you mount a file system on an ECS instance that resides in a different VPC, note that the ECS instance and the NAS file system must reside in the same region.

Why am I unable to mount a file system by using the NAS console?

The following table describes the possible causes of mount failures and the solutions.

Issue

Cause

Solution

The status of the ECS instance or Cloud Assistant Agent is abnormal.

The ECS instance is not running.

In the ECS console, check the status of the ECS instance and resolve the issue.

Cloud Assistant Agent is not installed.

Install Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent on a Linux instance.

The execution of the mount command times out or is interrupted.

The time required to install the NFS client is longer than expected.

Wait for a few minutes and then run the mount command again.

The NFS client fails to be installed.

The source of the NFS client fails to be identified.

Log on to the ECS instance and install the NFS client. For more information, see Step 1: Install an NFS client.

The format of the values specified for request parameters is invalid.

The specified mount path or the directory of the NAS file system is invalid.

Make sure that the specified mount path or the directory of the NAS file system is an absolute path. You can use the default values for optional parameters.

The mount path does not meet requirements.

The mount path is not empty.

Change the mount path and mount the file system again.

Another mount target is mounted on the mount path.

Another mount target is mounted on the parent directory of the mount path.

The mount command is invalid.

The values of one or more mount parameters are invalid.

We recommend that you use the default values for the mount parameters and mount the file system again.

Other causes

Run the troubleshooting script to resolve the issue. For more information, see Fix mount issues.

What happens if I forcibly unmount a NAS file system?

If you forcibly unmount a NAS file system, in-memory data may fail to be saved to the disk and related applications may unexpectedly exit. To prevent these issues, we recommend that you perform the following steps to unmount a NAS file system: Log on to the ECS instance and run a command that follows the fuser -mv <Mount path> syntax to check the processes that are connected to the file system. Stop all these processes except the mount process. Then, unmount the file system.

If a NAS file system to which no processes are connected fails to be unmounted, you can forcibly unmount the NAS file system. After you forcibly unmount a NAS file system, some temporary files may exist in the kernel. You must restart the ECS instance to remove the files. Otherwise, you may be unable to mount the NAS file system again.

How do I configure the mount parameters when I use the mount feature in the NAS console?

In the NAS console, optimal default values are specified for the mount parameters of the NAS file system that you want to mount based on the protocol version and the type of the NAS file system. If you do not have special requirements, we recommend that you use the default values of the mount parameters. If you change the default values, you may be unable to mount the file system.

If you need to change the default values of some mount parameters, contact NAS technical support.

Why am I unable to view the ECS instance that I created in the ECS instance list when I mount a file system in the NAS console?

We recommend that you refresh the page on which the ECS instance list is displayed. Then, you can run the mount command again and check whether the ECS instance is displayed.

Why does the new protocol type or the new value of a mount parameter not take effect when I use the mount feature?

If the specified mount target is mounted on the mount path, the new protocol type and the new value of a mount parameter are ignored. You must unmount the file system from the mount path before you can use the new protocol type and the new value of the mount parameter to mount the file system again.

Which operating systems and file system protocols are supported by the batch mount feature?

You can mount NFS file systems on Linux or Windows. You can also mount SMB file systems on Linux or Windows. To mount a file system on a Windows or Linux Elastic Compute Service (ECS) instance, log on to the ECS instance and run a mount command. For more information, see Mount an SMB file system on a Windows ECS instance, Mount a General-purpose NFS file system on a Windows ECS instance, and Mount an SMB file system on a Linux ECS instance.

Which mount options are supported by the batch mount feature?

You can mount a file system on a host in the classic network. You can also mount a file system across multiple VPCs that reside in the same region. You cannot mount a file system across multiple regions. Even if two VPCs that reside in different regions are connected, you still cannot mount a file system across the VPCs.

Can I use the batch mount feature to mount a file system on a host in a self-managed data center?

No, you cannot use the batch mount feature to mount a file system on a host in a self-managed data center. If you want to mount a file system on a host in a self-managed data center, you must configure a virtual private network (VPN) gateway or a network address translation (NAT) gateway. For more information, see Access a NAS file system from a data center by using a NAT gateway or Access an Apsara File Storage NAS file system from a local data center by using VPN Gateway.

How do I check the output of a batch mount or batch unmount command?

To check the output of a batch mount or batch unmount command, perform the following steps: Log on to the ECS console. In the left-side navigation pane, choose Maintenance & Monitoring > ECS Cloud Assistant. On the Command Execution Result tab of the Cloud Assistant page, you can view all tasks that are in the Task Failed, Successful, or Partially Failed state. To query the execution result of a task that you run on each ECS instance, you can click View in the Actions column of the task.

How do I view the mount information on the Cloud Assistant page after I mount multiple file systems on an ECS instance at the same time?

Perform the following steps: Log on to the NAS console. Go to the details page of the file system that you want to manage. On the Mount Targets tab, find the mount target that you want to manage and click Query in the Actions column to view the mount information about the corresponding ECS instance. For more information, see Query the mount status of an ECS instance.

How do I change the default value of a mount parameter based on my business scenario?

In most cases, you can use the default values for mount parameters. You can leave the mountparam parameter empty. If you want to configure specific mount parameters, you must configure all mount parameters in the mountparam parameter. You must configure noresvport and specify vers=3 or vers=4,minorversion=0. If you set the mountparam parameter to a custom value when you run the mount script, the value of the protocoltype parameter is ignored by the mount script. For more information, see Parameters.

Why does the new protocol type or the new value of a mount parameter not take effect when I use the batch mount feature?

If the specified mount target is mounted on the mount path, the new protocol type and the new value of a mount parameter are ignored. You must unmount the file system from the mount path before you can use the new protocol type and the new value of the mount parameter to mount the file system again.

What do I do if I cannot batch mount file systems, batch unmount file systems, or query the mount information about an ECS instance by using Cloud Assistant?

Make sure that the values that are specified for mount parameters are valid. Troubleshoot the issue based on the error code that is returned in the command output. For more information, see Error messages. Attempt to mount a file system on an ECS instance and check the result. If the mount still fails, troubleshoot the issue based on the returned error message.

You can mount a file system on an ECS instance in the NAS console. If the mount still fails, troubleshoot the issue based on the returned error message.

How do I fix the error that a subdirectory does not exist?

Error message: mount.nfs: access denied by server while mounting xxxx.nas.aliyuncs.com:/<dir>

This error may occur when you mount a non-existent subdirectory of a NAS file system on an ECS instance. To fix this error, you can first mount the root directory of the NAS file system. After the root directory is mounted, you can create a subdirectory for the NAS file system and mount the subdirectory. For more information, see How do I create and mount a subdirectory of a NAS file system on Linux?

What do I do if an error occurs due to conflicting ECS instance names when I mount a file system?

Issue

When you use NFSv4 to mount a file system on an ECS instance, the following error message is returned: mount.nfs: Operation not permitted or mount.nfs: an incorrect mount option was specified. However, when you use NFSv3 to mount the file system on the ECS instance, the mount is successful.

Cause

This error occurs for some kernel versions of Linux. For example, you attempt to mount an NFSv4.0 file system on an ECS instance (Instance A) that has the same name as another ECS instance (Instance B). However, the NFSv4.0 file system has already been mounted on the ECS instance (Instance B).

Solution

  1. Run the following command on the ECS instance that failed to be mounted.

    echo 'install nfs /sbin/modprobe --ignore-install nfs nfs4_unique_id=`cat /sys/class/dmi/id/product_uuid`' >> /etc/modprobe.d/nfs.conf
  2. Restart the ECS instance during off-peak hours.

    You can also manually unmount all NFS file systems from the ECS instance and run the rmmod command to uninstall NFSv4.0 clients and NFS kernel modules.

  3. Remount the NFS file system. For more information, see Mount an NFS file system on a Linux ECS instance.

How do I change the maximum number of concurrent NFS requests from an NFS client?

By default, the maximum number of concurrent requests from a Network File System (NFS) agent is 2. This affects the performance of NFS file systems. We recommend that you set the maximum number to 128.

  1. Install an NFS client. For more information, see Step 1: Install an NFS client.

  2. Run the following commands to set the maximum number of concurrent NFS requests to 128:

    echo "options sunrpc tcp_slot_table_entries=128" >> /etc/modprobe.d/sunrpc.conf
    echo "options sunrpc tcp_max_slot_table_entries=128" >>  /etc/modprobe.d/sunrpc.conf
    sysctl -w sunrpc.tcp_slot_table_entries=128
    Note

    The first time you install an NFS agent, run the preceding commands with root permissions. After you run the preceding commands, you do not need to run the commands again.

  3. Optional: Run the following command to restart the ECS instance:

    reboot
  4. Mount the file system. For more information, see Step 2: Mount an NFS file system.

  5. Run the following command to check the result.

    If the value 128 is returned, the maximum number is changed.

    cat /proc/sys/sunrpc/tcp_slot_table_entries

How do I create and mount a subdirectory of a NAS file system on Linux?

Make sure that a file system is mounted. For more information, see Mount an NFS file system on a Linux ECS instance.

If you mount the /mnt directory of the NAS file system on a Linux ECS instance, the /mnt directory is used as the root directory of the NAS file system. You can create subdirectories in the /mnt directory.

  1. Create a subdirectory in the root directory of the NAS file system on the Linux ECS instance.

    mkdir /mnt/subdir
  2. Create a local directory on which you want to mount the NAS file system.

    mkdir /tmp/mnt
    Note

    After you create a local directory on a server, you can mount only one file system on the local directory. If you want to mount multiple file systems, you must create multiple local directories.

  3. Remount the file system.

    sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,file-system-id.region.nas.aliyuncs.com:/subdir /tmp/mnt

    The following list describes the required fields. Replace the values of these fields with the actual values.

    • file-system-id.region.nas.aliyuncs.com: specifies the domain name of the mount target. To obtain the domain name of the mount target, perform the following steps: Log on to the NAS console. On the File System List page, click the name of the file system. On the details page, click Mount Targets and copy the mount command.

    • /subdir: specifies the subdirectory of the NAS file system.

    • /tmp/mnt: specifies the local directory of the server.

How do I resolve the issues that occur after I accidentally delete a mount target on a Linux ECS instance?

Issue

A file system is mounted on a Linux ECS instance by using Mount Target A. However, the mount target is deleted from the NAS console before the file system is unmounted. As a result, issues occur on Linux. For example, the system responds slowly or does not respond when you run commands.

Solution

  1. Log on to the Linux ECS instance and press Ctrl+C to stop the commands that are being run.

  2. Run the mount command to view the mount information.

    Obtain the mount directory from the mount information, for example, /mnt/data, as shown in the following figure.查看挂载信息

  3. Run the umount -f /mnt/data command to unmount the file system.

    Command syntax: unmount -f <Mount directory>

    Note

    If the file system fails to be unmounted by running the unmount -f <Mount directory> command, run the umount -l <Mount directory> command.

    After you unmount the file system, you can create a mount target to remount the file system.

How do I prevent the listening port of a file system that supports NFSv4.0 protocol from being considered as a Trojan horse?

Issue

After you mount a file system that supports the NFSv4.0 protocol on a compute node, a random listening port of 0.0.0.0 is listened to by using the protocol. The netstat command cannot identify the process of the listening port.

The listening port is a random port. Therefore, the backend application of the listening port cannot be identified. As a result, the listening port is considered as a Trojan horse.NFSv4.0

Cause

The NFSv4.0 protocol is used to listen to the random port for callback operations. The default value of the fs.nfs.nfs_callback_tcpport kernel parameter is 0. Therefore, the NFSv4.0 protocol is used to listen to a random port. This random port does not cause security risks.

Solution

Before you mount the file system, specify a non-zero value for the fs.nfs.nfs_callback_tcpport parameter. The non-zero value is used as the port number of the callback port.

sudo sysctl fs.nfs.nfs_callback_tcpport=<port>          

In the following example, the fs.nfs.nfs_callback_tcpport parameter is set to 45450. After you mount a file system that supports the NFSv4.0 protocol, the output of the netstat command indicates that the system listens to port 45450.45450

Can I mount an NFS file system and an SMB file system on the same ECS instance?

No, you cannot mount an NFS file system and an SMB file system on the same ECS instance. A file system can be mounted by using only one protocol.

You can mount an NFS file system on Linux and mount an SMB file system on Windows. To prevent compatibility issues, we recommend that you do not mount an SMB file system on Linux or mount an NFS file system on Windows. For example, Windows and Linux support different character sets and have different limits on the length of file names. In Windows, a file name can contain up to 255 wide characters encoded in the Unicode format. In Linux, a file name can contain up to 255 characters encoded in the UTF-8 format. For more information, see Usage notes and Cross-mount compatibility FAQ.

How do I prevent exceptions that may occur when multiple processes or clients concurrently write data to a log file?

Issue

NAS allows multiple clients to write data to different files in the same namespace. However, NFS does not support atomic appends. If multiple processes or clients concurrently write data to the same file, exceptions such as overwrite, crossover, and disordered content may occur. This is because each process independently maintains context information. The file can be a log file. The context information includes file descriptors and write locations.

Solution

  • Recommended. Configure different processes or clients to write data to different files in the same file system. When you analyze or process data, you can merge these files. This solution can resolve the issues that are caused by concurrent write operations without the need to use file locks. This solution does not affect system performance.

  • Use the flock and seek functions together. This ensures the atomicity and consistency of write operations. However, this solution requires a long period of time and may significantly affect system performance. The following steps describe this method.

Use the flock and seek functions together

NFS does not support atomic appends. If multiple clients append data to the same file such as a log, data entries may overwrite each other. In Linux, you can use the flock and seek functions together to simulate atomic appends in an NFS file system. This ensures data consistency when multiple processes concurrently append data to the same file.

To use the flock and seek functions together, perform the following steps:

  1. Call the fd=open(filename, O_WRONLY | O_APPEND | O_DIRECT) statement to open a file by using the append method. This statement is used to set the write method to O_DIRECT and obtain the file descriptor. O_DIRECT specifies a write-only method. In this case, no page cache is used.

  2. Call the flock(fd, LOCK_EX|LOCK_NB) function to obtain a file lock. If the function fails to obtain a file lock, an error message is returned. The possible cause of the failure is that the file lock is in use. You can try again or troubleshoot the failure.

  3. After the file lock is obtained, call the lseek(fd, 0, SEEK_END) function to set the current file offset of the file descriptor to the end of the file.

  4. Write data to the end of the file. The file lock is used to prevent data entries from overwriting each other.

  5. After data is written to the file, call the flock(fd, LOCK_UN) function to release the file lock.

Why does a file in a NAS file system belong to different owners when I query the file on two ECS instances?

In NAS file systems, users are identified by User Identifiers (UIDs) or Group Identifiers (GIDs) instead of user names. The owner name of a file that you query on an ECS instance is converted from a UID. If a UID is converted into different user names on different ECS instances, the UID is identified as a different owner on each ECS instance.

For example, create a file named admin_on_machine1 on ECS Instance 1 and a file named admin_on_machine2 on ECS Instance 2 as the admin user. Run the ll command on ECS Instance 1 to view the created file, as shown in the following figure.faq001 Run the ll command on ECS Instance 2 to view the created file, as shown in the following figure.faq002 The query results on the two ECS instances indicate that the same file has different owner names.

Run the id command on the two ECS instances to query the information about the admin user. The UID of the admin user on ECS Instance 1 is 505, as shown in the following figure.faq04 The UID of the admin user on ECS Instance 2 is 2915, as shown in the following figure.faq005 Run the stat admin_on_machine1 admin_on_machine2 command, as shown in the following figure. The results indicate that the two files belong to two different UIDs.faq

What do I do if Chinese characters written to a NAS file system are displayed in garbled text on the client?

Issue

You write Chinese characters (contained in the names or content of files) to a NAS file system on a Linux or Windows client. When you use a different client to read data, the Chinese characters are displayed in garbled text.

Cause

On Windows clients, Chinese characters are encoded and decoded by using the GBK character set by default. On Linux clients, Chinese characters are encoded and decoded by using the UTF-8 character set by default. Before data is written to the NAS file system, the data is encoded by using the character set that corresponds to the platform. When the data is read on another platform, the data cannot be decoded because the GBK character set and the UTF-8 character set are incompatible. As a result, Chinese characters are displayed in garbled text.

Solution

To ensure compatibility, we recommend that you use a Windows client to mount an SMB file system and use a Linux client to mount an NFS file system.

What do I do if a 523 error is returned when I run the ls command on a Linux client on which an NFS file system is mounted?

Issue

The following error message is returned when you run the ls command on a Linux client on which an NFS file system is mounted:29

Cause

If you run the ls command on a directory of a file system when multiple rename operations are concurrently performed, a 523 error occurs.

Solution

Try again later. If the error persists, contact NAS technical support.

What do I do if the mount.nfs: No such device error message is returned when I mount an NFS file system?

Issue

When you mount a NAS NFS file system on an ECS instance, the following error message appears:

mount.nfs: No such device

No such device

Cause

When the options sunrpc tcp_slot_table_entries=128 setting in the /etc/modprobe.d/sunrpc.conf file is changed to options sunrpc tcp_slot_entries=128, this issue may occur if the system fails to load the sunrpc module to the kernel.

Solution

  1. Change the options sunrpc tcp_slot_entries=128 setting in the /etc/modprobe.d/sunrpc.conf file to options sunrpc tcp_slot_table_entries=128.

  2. Run the modprobe sunrpc command to load the sunrpc module.

  3. Remount the NFS file system.

What can I do if I have enabled automatic mounting for an NFS file system but the NFS file system fails to be automatically mounted on the ECS instance?

Issue

You have enabled automatic mounting for an NFS file system. However, when the ECS instance is restarted, the NFS file system fails to be automatically mounted on the ECS instance.

Cause

The operating system of the ECS instance is CentOS 7.0. By default, CentOS 7.0 does not process non-local file systems in the fstab configuration file. The status of the remote-fs.target service is disable. Therefore, when the ECS instance is restarted, the NFS file system fails to be automatically mounted on the ECS instance.

Note

The configuration items do not change when the kernel version is upgraded. Therefore, when CenOS 7.0 is upgraded to 7.9, the remote-fs.target service is still disabled. You must manually enable the remote-fs.target service.

Solution

You can use one of the following solutions to ensure that the NFS file system is automatically mounted on the ECS instance when the ECS instance is restarted. Then, you can open the /etc/fstab configuration file to enable automatic mounting. For more information about how to enable automatic mounting for an NFS file system, see Mount an NFS file system on a Linux ECS instance.

  • Solution 1: Resolve the issue for good

    Run the following commands in sequence to enable the remote-fs.target service:

    systemctl start remote-fs.target
    systemctl enable remote-fs.target

  • Solution 2: Resolve the issue temporarily

    Run the following commands in the rc.local configuration file to enable the remote-fs.target service:

    [ ! -f /etc/rc.local ] && echo '#!/bin/bash' > /etc/rc.local; echo "mount -a -t nfs" >> /etc/rc.local; chmod +x /etc/rc.local

What do I do if the mount: can't find /root/nas in /etc/fstab error message is returned when I mount an NFS file system?

Issue

When you mount an NFS file system on an ECS instance, the following error message appears:

mount: can't find /root/nas in /etc/fstab

Cause

The command syntax may be incorrect.

Solution

Run the correct mount command to mount the NFS file system. For more information about the command parameters that are used to mount NFS file systems on Linux, see Mount an NFS file system on a Linux ECS instance.

  • For a General-purpose NAS file system, run one of the following commands.

    To use NFSv3 to mount the file system, run the following command:

    sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport file-system-id.region.nas.aliyuncs.com:/ /mnt

    To use NFSv4 to mount the file system, run the following command:

    sudo mount -t nfs -o vers=4,minorversion=0,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport file-system-id.region.nas.aliyuncs.com:/ /mnt                                
  • For an Extreme NAS file system, run the following command:

    sudo mount -t nfs -o vers=3,nolock,noacl,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport file-system-id.region.extreme.nas.aliyuncs.com:/share /mnt

In the preceding command, file-system-id.region.nas.aliyuncs.com indicates the domain name of the mount target for the NFS file system. Replace it with the actual domain name.

How do I resolve the latency in creating files in an NFS file system?

  • Issue

    ECS-1 creates the abc file, but it takes some time for ECS-2 to read the abc file. The latency ranges from 1 second to 1 minute.

  • Cause

    The issue is caused by the lookup cache, which meets the expected time T. For example, ECS-2 accesses the abc file before ECS-1 has created it, causing the issue that the file does not exist on ECS-2. As a result, a record indicating that the abc file does not exist is cached. FileAttr has not expired within time T. Therefore, when ECS-2 accesses the file again, it still accesses the record indicating that the abc file does not exist, which was cached the first time that ECS-2 accessed the file.

  • Solution

    To ensure that ECS-2 can read the file immediately after ECS-1 creates it, you can use one of the following solutions:

    • Solution 1: Disable negative lookup cache for ECS-2 so that files that do not exist are not cached. This solution causes the minimum overhead.

      Add the lookupcache=positive (default value: lookupcache=all) field when you mount the file system. Run the following command to mount the file system:

      sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,lookupcache=positive file-system-id.region.nas.aliyuncs.com:/ /mnt
    • Solution 2: Disable all caches on ECS-2. This solution results in poor performance. Select an appropriate solution based on your business requirements.

      Add the actimeo=0 field when you mount the file system. Run the following command to mount the file system:

      sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,actimeo=0 file-system-id.region.nas.aliyuncs.com:/ /mnt

How do I resolve the latency in writing data to an NFS file system?

  • Issue

    ECS-1 has updated the abc file. However, when ECS-2 reads the file immediately, the file content is still not updated.

  • Cause

    The following two causes are involved:

    • Cause 1: After ECS-1 writes the abc file, ECS-1 does not flush the content immediately. Instead, it caches the content into the page cache and relies on the application layer to call the fsync or close operation.

    • Cause 2: File caches exist on ECS-2. Therefore, ECS 2 may not immediately obtain the latest file content from the server. For example, ECS-2 has cached the data when ECS-1 updates the abc file. As a result, the cached content is still used when ECS-2 reads the file.

  • Solution

    To ensure that ECS-2 can read the file immediately after ECS-1 creates it, you can use one of the following solutions:

    • Solution 1: Apply the file-based close-to-open (CTO) consistency model so that the read and write operations on ECS-1 or ECS-2 conform to CTO consistency. This way, ECS-2 can definitely read the latest data. Specifically, ECS-1 executes the close or fsync operation after it updates a file. ECS-2 executes the open operation before it reads the file.

    • Solution 2: Disable all caches on ECS-1 and ECS-2. This solution results in poor performance. Select an appropriate solution based on your business requirements.

      • Disable caching on ECS-1. When you mount the file system, add the noac field to ensure that all written data is immediately flushed into the disk. Run the following command to mount the file system:

        sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,noac file-system-id.region.nas.aliyuncs.com:/ /mnt
        Note
        • If you call the fsync operation after the write operation on ECS-1 is complete or you call the sync operation to write data, replace "noac" in the preceding command with "actimeo=0" to improve the performance slightly.

        • noac is equivalent to actimeo=0 plus sync. In this case, all write operations are forcibly executed by using sync.

      • Disable caching on ECS-2. When you mount the file system, add the actimeo=0 field to omit all caches. Run the following command to mount the file system:

        sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,actimeo=0 file-system-id.region.nas.aliyuncs.com:/ /mnt

How do I fix the error that occurs when I mount an SMB file system on Windows?

System error 53

  • Error description

    The network path is not found.

  • Cause

    • The network connection fails.

    • The TCP/IP NetBIOS Helper service is not started.

    • LanmanWorkstation is not specified in the registry.

  • Solution

    1. Run the ping <Endpoint of a mount target> command to check whether the endpoint of a mount target can be accessed and whether the latency is within the expected range.

      • If the endpoint of the mount target can be pinged, go to Step b.

      • Otherwise, perform the following steps:

        • Verify that the mount command is valid. Make sure that the command does not include redundant forward slashes (/), backslashes (\), spaces, or myshare.

          To run a valid command to mount an SMB file system, use the following syntax:

          net use <Letter of the destination drive> \\<Endpoint of a mount target>\myshare

          Example:

          net use z: \\xxxx.cn-hangzhou.nas.aliyuncs.com\myshare 
        • Make sure that the protocol type of the file system is SMB.SMB

        • Make sure that the endpoint of the mount target is valid.

        • Make sure that the ECS instance and the mount target reside in the same VPC.

        • If the ECS instance and the mount target do not reside in the same VPC, make sure that the VPC or VPN configurations of the ECS instance are valid.

    2. Run the telnet <Endpoint of a mount target> 445 command to check whether the SMB protocol is enabled.

    3. Check whether the TCP/IP NetBIOS Helper service is started. For more information, see Mount an SMB file system on a Windows ECS instance.

    4. Open the Registry Editor and choose HKEY_LOCAL_MACHINE > System > CurrentControlSet > Control > NetworkProvider > Order. In the dialog box that appears, check whether the ProviderOrder key contains the LanmanWorkstation value. If the ProviderOrder key does not contain the LanmanWorkstation value, add the value to the ProviderOrder key.检查注册表

System error 58

  • Error description

    The specified server cannot perform the requested operation.

  • Cause

    The Windows operating system that the ECS instance runs is incompatible with the SMB protocol that is used by the file system.

  • Solution

    Make sure that the ECS instance runs Windows Server 2008 R2 or a later version except Windows Server 2008.

System error 64

  • Error description

    The specified network name is unavailable.

  • Cause

    • The IP address of the ECS instance is not included in the permission groups of the NAS file system.

    • The internal IP address or VPC IP address of the ECS instance is not included in the permission groups of the NAS file system.

    • Your Alibaba Cloud account has overdue payments.

    • The ECS instance and the NAS file system reside in the classic network, but belong to different Alibaba Cloud accounts.

    • The protocol type of the file system is not SMB.

  • Solution

    This error occurs because the NAS file system cannot be accessed. Perform the following steps to fix the error:

    1. Make sure that the internal IP address or VPC IP address of the ECS instance is included in the permission groups of the NAS file system.

    2. Make sure that your Alibaba Cloud account does not have overdue payments.

    3. If the ECS instance and the NAS file system reside in the classic network, make sure that they belong to the same Alibaba Cloud account.

    4. Make sure that the protocol type of the file system is SMB.系统错误 64

System error 67

  • Error description

    The network name cannot be found.

  • Cause

    The required network services are not started.

  • Solution

    Start the following services. For more information, see Mount an SMB file system on a Windows ECS instance.

    1. The Workstation service.

    2. The TCP/IP NetBIOS Helper service.

System error 85

  • Error description

    The local device name is already in use.

  • Cause

    The specified drive letter is already in use.

  • Solution

    Change the drive letter and remount the file system.

System error 1231

  • Error description

    The network location is unavailable.

  • Cause

    • The Client for Microsoft Networks component is uninstalled or disabled.

    • The File and Printer Sharing for Microsoft Networks component is uninstalled or disabled.

  • Solution

    Install and enable the Client for Microsoft Networks component or the File and Printer Sharing for Microsoft Networks component.

    If the Client for Microsoft Networks component or the File and Printer Sharing for Microsoft Networks component is installed but not enabled, select the Client for Microsoft Networks option or the File and Printer Sharing for Microsoft Networks option. To install and enable the component, perform the following steps:

    1. On the Network and Sharing Center page, click the active network connection.

    2. Click Properties.

    3. In the WLAN Properties dialog box, click Install.

      • Install the Client for Microsoft Networks component.

        1. In the Select Network Feature Type dialog box, select Client and click Add.

        2. Select Client for Microsoft Networks and click OK.

      • Install the File and Printer Sharing for Microsoft Networks component.

        1. In the Select Network Feature Type dialog box, select Service and click Add.

        2. Choose Microsoft > File and Printer Sharing for Microsoft and click OK.

System error 1272

  • Error description

    You cannot access this shared folder because the security policies of your organization block access from unauthorized guests. These policies protect your PC from suspicious or unauthorized devices on the network.

  • Cause

    The security policies of the Windows operating system block access from guest users to the SMB file system.

  • Solution

    If the ECS instance runs a Windows operating system that is later than Windows Server 2016, configure the following registry to allow access from guest users.

    1. Log on to the ECS instance on which the file system is mounted.

    2. Open the Command Prompt. Run the regedit command to open the Registry Editor window.

    3. In the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters path, make sure that the value of the AllowInsecureGuestAuth registry key is 1.

      1. If the value of the AllowInsecureGuestAuth registry key is changed to 0, right-click the AllowInsecureGuestAuth registry key and change the value of Value data (V) to 1.

      2. If the AllowInsecureGuestAuth registry key is not found, switch to PowerShell and run the following command to add the AllowInsecureGuestAuth registry key:

        New-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters -Name AllowInsecureGuestAuth -PropertyType DWORD -Value 1 
    4. Remount the SMB file system.

      net use Z: \\file-system-id.region.nas.aliyuncs.com\myshare

      If error 1272 persists, the value of the RequireSecuritySignature registry key may be 1. Change the value to 0, and then remount the SMB file system.

      The path of the RequireSecuritySignature registry key is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters.

    For more information, see Guest access in SMB2 disabled by default in Windows and Overview of Server Message Block signing.

Why am I unable to mount an SMB file system on a Windows operating system that is later than Windows Server 2016?

Issue

An error occurs when you run the following command:

C:\Users\Administrator>net use z: \\xxxxx-xxxx.xxxxx.nas.aliyuncs.com\myshare
System error 1272 has occurred.
You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.

Cause

This error occurs because the security policies of Windows operating systems that are later than Windows Server 2016 do not allow guest users to access remote shared directories.

Solution

  • Find the following registry key:

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
    "AllowInsecureGuestAuth"=dword:0

    Modify the key.

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
    "AllowInsecureGuestAuth"=dword:1
  • Open PowerShell and run the following command:

    New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force

For more information, see Guest access in SMB2 disabled by default in Windows 10, Windows Server 2016 version 1709, and Windows Server 2019.

Why am I unable to mount an SMB file system?

Issue

The net use command is used to mount SMB file systems. If you accidentally use the command to mount NFS file systems, you can no longer use the command to mount an SMB file system.

Solution

Make sure that the protocol of the file system is SMB. Then, stop the mount operation and attempt to mount the file system again 5 minutes later. If the issue persists, contact NAS technical support.

Why is a mounted SMB directory visible only to an administrator?

Windows user accounts are isolated from each other. For example, if you log on to Windows as User A, you cannot view the directory that you mounted as User B.

If you want to allow multiple users to share data, create a shared directory. For example, you can run the following command to create a shared directory named myshare on drive C:

mklink /D C:\myshare \\xxxxxxx-xxxx.cn-beijing.nas.aliyuncs.com\myshare\

Why is Internet Information Services (IIS) unable to load the files of an SMB volume on Windows Server 2016?

For more information about how to resolve this issue, see Install and configure Active Directory domains.

How do I fix the error that occurs when I use IIS to access a NAS file system?

When you mount an SMB file system on Windows Server 2016, an HTTP error 500.19 (error code: 0x8007003a) occurs. For information about how to fix this error, see Best practices for using IIS to access a NAS file system.

How do I improve the performance of an SMB file system that is mounted on Linux?

If the performance of your SMB file system does not meet your requirements, you can improve the performance based on one of the following causes:

  • Cause 1: The throughput of an SMB file system varies based on the storage capacity of the SMB file system. The maximum read and write throughput of the SMB file system has a linear relationship with the capacity of the file system.

    Solution: Use the fio tool to test the performance of the SMB file system. For more information, see Test the performance of a NAS file system.

  • Cause 2: The bandwidth of the Linux ECS instance is low.

    Solution: Use multiple Linux ECS instances to make sure that the file system can provide expected performance.

  • Cause 3: Caching is disabled for the SMB client.

    Solution: If the cache parameter is set to strict, caching is enabled. If the cache parameter is set to none, caching is disabled. By default, caching is enabled for an SMB client. You can run the sudo mount | grep cifs command to check the value of the cache parameter.

  • Cause 4: The I/O size of the SMB client does not meet your business requirements.

    Solution: Configure the rsize and wsize parameters based on your business requirements. The default value of the two parameters is 1048576.

  • Cause 5: The Linux ECS instance uses low-specification CPU or memory, or most CPU or memory resources are occupied by other processes.

    Solution: Specify CPU and memory specifications for the Linux ECS instance based on your business requirements. This ensures that the file system can function as expected. You can run the top command to check the CPU utilization and memory usage.

  • Cause 6: The atime parameter is configured when you mount the file system.

    Solution: Do not configure the atime parameter if your business does not require fast file access.

  • Cause 7: The web server such as Apache HTTP Server on the Linux ECS instance processes a few write requests. These requests require notifications and frequent read operations on a large number of small files.

    Solution: Configure the caching mechanism of the web server on the Linux ECS instance. You can also contact Alibaba Cloud to enable the acceleration feature for the web server.

Why am I unable to mount an SMB file system on Linux?

You may not be able to mount an SMB file system on Linux due to various causes. For more information about how to troubleshoot this issue, see the "Mount an SMB file system on a Linux ECS instance" section in Fix mount issues.

When I mount an SMB file system on Linux, why does it take a long time to migrate or replicate files?

Check the performance of the file system. If the performance of the file system meets your requirements, a possible cause is that the files are not concurrently migrated or replicated. You can use the following open source tools to migrate or replicate files.

  • GNU Parallel

    Specify a number of threads based on your system resources. Example: find * -type | parallel --will-cite -j 10 cp {} /mnt/smb/ &

  • Fpart

  • Fpsync

  • multi

How do I fix the Permission denied error that occurs when I access an SMB file system on Linux?

Cause: You specified an invalid value for the uid, gid, file_mode, or dir_mode parameter when you mounted the file system.

Solution: Verify that the values that are specified for the uid, gid, file_mode, and dir_mode parameters are valid. For more information, see Mount an SMB file system on a Linux ECS instance.

How do I rename the files of an SMB file system by changing the letter case?

The file names of an SMB file system are case-insensitive. This also applies to Windows systems. You cannot rename a file in an SMB file system by changing only the letter case.

However, you can change a file name to a different name that contains different letters. Then, you can change the file name to the original name with a different letter case.

Why am I unable to change the owner of a file and the access mode of a file or a directory?

You can specify the owner of a file and the access mode of a file or directory in a file system only when you mount the file system. For more information, see Mount an SMB file system on a Linux ECS instance.

What do I do if a server does not respond within 35 seconds when multiple clients concurrently access a file on the server?

Cause: The kernel driver of the current SMB protocol fails to work as expected. If the SMB protocol version is 2.1 or 3.0, the server does not respond within 35 seconds. In this case, the clients cannot send SMB break acknowledgment packets to the server.

Solution 1: Set the vers parameter to 2.0 if you mount the file system on the Linux ECS instance.

Solution 2: Perform the following operations:

  1. If the CIFS module is being loaded, run the following command to disable the oplock feature:

    # modprobe cifs enable_oplocks=0

  2. If the CIFS module is already loaded, run the following command to disable the oplock feature:

    # echo 0 > /sys/module/cifs/parameters/enable_oplocks

  3. Run the following command to check the status of the oplock feature:

    # cat /sys/module/cifs/parameters/enable_oplocks

    In the command output, Y indicates that the feature is enabled. N indicates that the feature is disabled.

    Note
    • To apply the preceding changes, unmount and remount the SMB file system.

    • To permanently apply the preceding changes, create the /etc/modprobe.d/cifs.conf file and add the options cifs enable_oplocks=0 statement to the file.

Why does the mount target of an SMB file system not respond?

Cause: If the kernel version of your Linux distribution is 3.10.0-514 or earlier, the kernel driver of the SMB protocol may fail to respond when multiple clients concurrently access the file system. As a result, the mount target cannot be accessed. The following record is included in the kernel log:

...
[<ffffffffc03c9bc1>] cifs_oplock_break+0x1f1/0x270 [cifs]
[<ffffffff810a881a>] process_one_work+0x17a/0x440
[<ffffffff810a8d74>] rescuer_thread+0x294/0x3c0
...

Solution

  • Set the cache parameter to none to remount the file system. This may affect the performance of the file system.

  • Upgrade the operating system of the Linux ECS instance.

Why am I unable to create a symbolic link?

Cause

When you mount an SMB file system on Linux, the mfsymlinks option is not selected, or the file system is mounted by using the 2.0 protocol version.

Solution

When you mount an SMB file system on Linux, use the 2.1 or 3.0 protocol version and select the mfsymlinks option. The following sample mount command shows the mount parameters. For more information, see Mount an SMB file system on a Linux ECS instance.

sudo mount -t cifs //file-system-id.region.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

What do I do if the "cp: error writing '</path/to/file>': Bad file descriptor" error message is returned when I copy a large file?

Cause

A temporary minor fault occurs on the network or at the backend. SMB clients on some Linux distributions, such as SUSE, have limited features and may not support failover.

Solution

We recommend that you select a Linux version supported by NAS SMB. The following table lists the Linux versions supported by NAS SMB.

Operating system

Version

CentOS

CentOS 7.6 64-bit: 3.10.0-957.21.3.el7.x86_64 and later

Alibaba Cloud Linux

Alibaba Cloud Linux 2.1903 64-bit: 4.19.43-13.2.al7.x86_64 and later

Debian

Debian 9.10 64-bit: 4.9.0-9-amd64 and later

Ubuntu

Ubuntu 18.04 64-bit: 4.15.0-52-generic and later

openSUSE

openSUSE 42.3 64-bit: 4.4.90-28-default and later

SUSE Linux

SUSE Linux Enterprise Server 12 SP2 64-bit: 4.4.74-92.35-default and later

CoreOS

CoreOS 2079.4.0 64-bit: 4.19.43-coreos and later

If the system fails to terminate processes that connect to an SMB file system, how do I release the handles that are exposed by a client?

You can use one of the following tools to remove all connections from an SMB file system. This way, all handles are released.

  • Windows client

    Use the tcpview tool to remove all connections from an SMB file system. For more information, see tcpview.4

  • Linux client

    Use the killcx tool to remove all connections from an SMB file system. For more information, see killcx.

How do I fix the errors that occur when I soft mount an NFS file system on Windows?

  • Issue

    By default, the soft mode is used when you mount an NFS file system on Windows. However, in some scenarios, soft mounts result in data inconsistency or unexpected application exits.

    • Data inconsistency: An application sends an ECS instance a request to write data to a soft-mounted file system. If the application does not receive a response from the instance before the request times out, an error is returned even if data is written to the file system. In this case, the application determines that the request failed. However, the ECS instance determines that the request is successful. As a result, data inconsistency occurs.

    • Unexpected application exits: An application sends an ECS instance a request to access a soft-mounted file system. If the application does not receive a response from the instance before the request times out, an error is returned. In this case, an exception may be thrown based on the programming language that is used to write the application. If the exception is not handled, the application exits.

  • Solution

    To prevent these issues, hard mount the NFS file system on the Windows ECS instance.

    1. Run the mount command to view the mount mode.

      • If the command output includes mount=soft, perform the following steps.

      • If the command output includes mount=hard, you do not need to perform the following steps.hard

    2. Stop the application that is using the NFS file system.

    3. Run the following command to unmount the NFS file system:

      umount H:

      Replace the drive letter H: based on your business requirements.

    4. Run the following command to remount the NFS file system:

      mount -o nolock -o mtype=hard -o timeout=60 \\xxxxxx.cn-hangzhou.nas.aliyuncs.com\! h:

      Replace the domain name of the mount target xxxxxx.cn-hangzhou.nas.aliyuncs.com and the drive letter h: based on your business requirements.

    5. Run the mount command to check the mount result.

      If the command output includes mount=hard, locking=no, and timeout=10 or a number greater than 10, the mount is successful.挂载结果

How do I fix the error that occurs when I mount an NFS file system on Windows?

How do I fix the invalid device error that is returned when I attempt to rename a file on a Windows NFS client?

If you mount an NFS file system on a subdirectory of an ECS instance, the invalid device error message is returned when you rename a file. To fix this error, mount the file system on the root directory of the ECS instance. For more information, see Step 2: Mount an NFS file system.

Why does it take a long time to create or open a file when I mount an NFS file system on Windows?

Cause

When you mount an NFS file system on Windows, compatibility issues related to case-sensitive and case-insensitive letters may occur. The performance of creating files degrades with the number of directories. This is because the directory is traversed every time you create a file. When the number of directories reaches 100,000, one directory traversal requires more than 10 seconds.

Solution

Add the -o casesensitive=yes field to the mount parameters to prevent directory traversal. Run the following command to mount the file system:

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

You must replace the drive letter Z and the domain name of the mount target file-system-id.region.nas.aliyuncs.com with the actual drive letter and domain name.

Note

The casesensitive option conflicts with the native semantics of Windows. When you use NFS directories, you must make sure that name conflicts do not occur due to case sensitivity. For example, a.txt conflicts with A.TXT. If you modify the mount parameters, uncertain impact may occur. We recommend that you mount an SMB file system on Windows.

Does an NFS file system that is mounted on Windows support the file lock feature?

No, an NFS file system that is mounted on Windows does not support the file lock feature. If you want to use the file lock feature on Windows, we recommend that you use an SMB file system.

Why do I need to mount a NAS file system by using the noresvport parameter?

If network switchovers or high availability (HA) switchovers of backend services occur in a NAS file system, the network connection of the file system may be interrupted, and you may need to wait for a few minutes to allow the connection to automatically recover. If the connection fails to automatically recover, you must restart the ECS instance. If you configure the noresvport parameter, the connection can automatically recover within a few seconds.

How do I resolve the issues that are related to the noresvport parameter?

Note

This issue exists only for Linux users. If you are a Windows user or you mount NAS file systems by using CSI or Flexvolume plug-ins in Container Service for Kubernetes (ACK) clusters, you can skip this question.

  1. Check whether the noresvport parameter is configured when you mount a file system.

    1. Run the following command on a Linux ECS instance to download the check_noresvport.py script:

      wget -N https://nas-client-tools.oss-cn-hangzhou.aliyuncs.com/linux_client/check_noresvport.py -P /tmp/
    2. Run the following Python command to run the script:

      python2.7 /tmp/check_noresvport.py -e

      If the "There is no issue for 'noresvport' on this ECS" message appears, skip the following steps.

  2. Resolve the issues that are related to the noresvport parameter.

    Note

    We recommend that you resolve these issues during off-peak hours.

    Use one of the following solutions to resolve the issues based on your scenario.

    • If you mount a NAS file system on an ECS instance, run the following command to run the script again:

      python2.7 /tmp/check_noresvport.py -e -r
    • If you mount a NAS file system on a container, run the following command to run the script again on the node on which the container resides:

      python2.7 /tmp/check_noresvport.py -e -c
  3. Update the settings for an automatic mount.

    After you complete the preceding steps, repeat Step 1 and verify the result. If the issue persists, contact NAS technical support.

What happens when a network switchover or an HA switchover occurs on backend services?

NAS provides stable and continuous file storage services. However, network switchovers or HA switchovers of backend services may still occur in specific scenarios. Service upgrades may trigger HA switchovers of backend services, which may interrupt the client network. Before service upgrades, Alibaba Cloud sends notifications about the upgrade schedule to all related users. This ensures that you have sufficient time to configure the noresvport parameter. We recommend that you configure the noresvport parameter at your earliest opportunity even if no upgrade is scheduled at the backend. This way, connection failures can be prevented in other switchover scenarios, such as switchovers that are triggered by changes on Server Load Balancer (SLB) instances and hardware failures at the backend.

Why do I need to remount a file system? Can I use an alternative solution?

Before you can use the noresvport parameter to mount a file system, you must remount the file system. This way, you can close all TCP connections to which the noresvport parameter is not applied. When you use the noresvport parameter to mount the file system, new TCP connections are established. To close all previous TCP connections, you must stop all services that use the NAS file system. Then, you can run the umount command to unmount the file system.

If you do not want to remount the file system, we recommend that you create a mount target based on a new file system. In this case, you must mount the new file system on a different local directory. You can migrate all services to the new local directory. Then, you can disable the old mount directory and mount target.

How do I check the security group configurations of an ECS instance?

When you mount an NFS file system on an ECS instance, the NFS file system depends on ports 2049, 111, 4001, and 4002. When you mount an SMB file system on an ECS instance, the SMB file system depends on port 445. If the outbound rules of the security group are configured to deny access to these ports, the NAS file system fails to be mounted.

You can perform the following steps to check and modify the configurations of security group rules.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Network & Security > Security Groups.

  3. In the top navigation bar, select a region.

  4. Click the ID of the security group rule to go to the details page of the security group rule.

  5. Click the Outbound tab. On the Outbound tab, check whether the IP address or CIDR block of the mount target for the file system and the required ports can be accessed over TCP. For an NFS file system, ports 2049, 111, 4001, and 4002 are required. For an SMB file system, port 445 is required.

    Note
    • By default, the outbound rule of a basic security group allows all access requests. In this case, no modification is required.

    • By default, the outbound rule of an advanced security group denies all access requests. In this case, you need to allow access from the related TCP ports in the outbound rule for the IP address of the mount target for the file system.

    If the preceding ports and the IP address or CIDR block of the mount target for the file system are denied access by the outbound rule of a security group, click Edit in the Actions column to modify the settings of Action, Port Range, or Authorization Object. For more information about security group rules, see Security group rules.

    If a resolution error occurs, you can add the following rule to the security group to support default DNS resolution.

    Action

    Priority

    Protocol Type

    Port Range

    Authorization Object

    Allow

    1

    Custom UDP

    Dest: 53/53

    Dest: 0.0.0.0/0

    For example, you can allow outbound data transfer over port 2049 for the IP address (192.168.12.151) of the mount target for the file system.

    • Basic security group

      Action

      Priority

      Protocol Type

      Port Range

      Authorization Object

      Allow

      1

      Custom TCP

      Dest: 2049/2049

      The following CIDR blocks include the IP address of the mount target (192.168.12.151). You can configure one of the following CIDR blocks:

      • 0.0.0.0/0

      • 192.0.0.0/8

      • 192.168.0.0/16

      • 192.168.12.0/24

      • 192.168.12.151/32

    • Advanced security group

      Action

      Priority

      Protocol Type

      Port Range

      Authorization Object

      Allow

      1

      Custom TCP

      Dest: 2049/2049

      The following CIDR blocks include the IP address of the mount target (192.168.12.151). You can configure one of the following CIDR blocks:

      • 0.0.0.0/0

      • 192.0.0.0/8

      • 192.168.0.0/16

      • 192.168.12.0/24

      • 192.168.12.151/32

How do I check NAS permission group rules?

In Apsara File Storage NAS, each permission group represents a whitelist. The private IP address of the ECS instance must be in the whitelist of the permission group configured for the mount target. If the permission group rule of the mount target does not include the IP address or CIDR block of the ECS instance on which the file system is mounted, you cannot mount the NAS file system.

Note

We recommend that you add all private IP addresses (including secondary private IP addresses) of your ECS instance to the permission group that is attached to the mount target. This ensures that the NAS file system can still be accessed during switching of network interface cards (NICs).

You can perform the following steps to check and modify a permission group rule:

  1. Log on to the NAS console.

  2. In the left-side navigation pane, choose File System > File System List.

  3. In the top navigation bar, select a region.

  4. Click the 展开 icon in front of the file system. View the permission group configured for the mount target in the Permission Group column.

    • If the permission group is VPC default permission group (all allowed), no modification is required.

      The default permission group allows read and write access from all IP addresses to a file system. No limits are specified for Linux system users. The default permission group cannot be deleted or modified.

    • For a custom permission group, click the name of the permission group to view the rule of the custom permission group.

      If the rule does not include the IP address or CIDR block of the ECS instance on which the file system is mounted, you can click Edit to add the IP address of the ECS instance to Authorized Address.

      For example, if the IP address (192.168.12.150) of the ECS instance on which the file system is mounted is not displayed in the Authorized Address column, you can add one of the following CIDR blocks to Authorized Address:

      • 192.168.12.150/32

      • 192.168.12.0/24

      • 192.168.0.0/16

      • 192.0.0.0/8

      • 0.0.0.0/0

Can I modify the security group rule that is automatically generated by an Extreme NAS file system?

No, you cannot modify or delete the security group rule that is automatically generated by an Extreme NAS file system. If the description of the security group rule is Created by nas. Should not delete it, the security group rule is automatically generated by the Extreme NAS file system. This security group rule applies only to the ENI of the Extreme NAS server. If you receive a high-risk alert about the security group of the Extreme NAS file system from Security Center, we recommend that you add the IP address in the alert to the whitelist.

Why does Security Center send a high-risk alert about the security group of an Extreme NAS file system?

Security Center detects ECS security group rules based on modules. The security group on the ECS instance is the default security group. If unnecessary ports are detected, Security Center generates an alert and prompts you to configure the minimum access permissions on the security group. If the description of the security group rule is Created by nas. Should not delete it, the security group rule is automatically generated by the Extreme NAS file system. This security group rule applies only to the ENI of the Extreme NAS server. If the alert affects your use, we recommend that you add the IP address in the alert to the whitelist.

How are files whose names are prefixed with .nfs generated? How do I delete the files?

If you delete a file that is being used by an application, a temporary file whose name is prefixed with .nfs is generated. When the process that uses the file ends, the temporary file is automatically deleted.

When I access a file in the directory of a NAS file system, the bind conn to session failed on NFSv4 server error message is returned. How do I fix this error?

  • Cause

    The error message is returned because you mounted the file system by using the NFSv4.1 protocol. NAS does not support this protocol.

  • Solution

    Use the NFSv3.0 or NFSv4.0 protocol to remount the file system based on your business requirements. For more information, see Usage notes.

What do I do if data is not synchronized when an NFS file system is mounted on multiple ECS instances?

Issue

When you use multiple clients to perform real-time synchronization for a NAS file system that has multiple mount targets, a high latency occurs.

Cause

By default, the kernel of the operating system maintains the properties of files and directories and generates a metadata cache to reduce the need to call the NFSPROC_GETATTR remote procedure.

Solution

Run the following mount command to disable caching of file and directory attributes:

mount -t nfs4 -o noac file-system-id.region.nas.aliyuncs.com:/ /mnt

In the preceding command, file-system-id.region.nas.aliyuncs.com specifies the domain name of the mount target of the NAS file system and /mnt specifies the local directory that resides on the current ECS instance. You need to replace the values with the actual values.

Why does a pod still write data to an unmounted NAS file system after I mount a new NAS file system?

Cause

When you mount a NAS file system on an ECS instance and map the mount directory of the NAS file system to a container by using the local volume (HostPath) mapping method, the mount information of the container is independent of that of the ECS instance. When you detach the mount directory from the ECS instance or mount a new NAS file system on the ECS instance, the container that has been started still uses the NAS file system that was mounted at startup.

Solution

Remount the new NAS file system on the ECS instance. Then, restart the pod.

Can a NAS file system be used as a storage directory for Docker services?

No, a NAS file system cannot be used as a storage directory for Docker services. The overlay feature is required for Docker storage. NAS does not support the overlay feature.

What do I do if the access denied by server while mounting <mount directory> error message is returned when I use a container to mount a file system?

Issue

When you mount a NAS file system on a container, the access denied by server while mounting <mount directory> error message is returned.

Cause

This issue occurs due to one of the following causes:

  1. The mount directory does not exist.

  2. The role that is used to run the container does not have the permissions to manage the NAS file system.

  3. The permission group configured for the mount target does not have access permissions on the container.

Solution

  1. Check whether the mount directory exists.

    You can run the cd <mount directory> command to check whether the mount directory exists.

  2. Check whether the user that runs the container has the root permissions.

    If the user does not have the root permissions, you must log on to the NAS file system as the root user, change the permission attributes, and then mount the file system. This way, the permissions of the container user are the same as the permissions on the mount targets of the file system. When you mount the file system on the container, run the container in privileged mode.

  3. Check whether the permission group configured for the mount target contains the container IP address.

    1. Log on to the NAS console

    2. In the left-side navigation pane, choose File System > File System List.

    3. On the File Systems page, click the 展开.png icon in front of the desired file system to expand the list of mount targets.

    4. In the Permission Group column of the Mount Target section, click the desired permission group to go to the Rules page of the permission group.

    5. Check that the container IP address is added to the rule of the permission group.

      If the container IP address does not exist in the rule, add the container IP address. For more information, see Add rules to the permission group.

How do I mount a NAS file system on a local computer or a third-party host?

Operating environment

Usage notes

Linux

You can use one of the following methods to access a NAS file system:

Windows

macOS client

Mount an SMB file system on a macOS client and access the SMB file system by using the Kerberos protocol. For more information, see Access an SMB file system from a macOS client by using VPN Gateway.

How do I mount a NAS file system on WUYING Workspace?

WUYING Workspace can work with NAS to implement shared storage. You can create a NAS file system for each workspace to share files between cloud desktops in the workspace.

If cloud desktops in the same workspace need to share files, you can use one of the following methods to mount a NAS file system:

  • No NAS file system is created on WUYING Workspace

    Log on to the WUYING Workspace console and create a NAS file system. The system automatically mounts the NAS file system on the cloud desktops in the corresponding workspace. After the NAS file system is created, you can view it on the Apsara File Storage NAS page. When the status of the file system changes to Started, the NAS file system is created. For more information, see Mount a NAS file system on a Windows cloud computer.

  • A NAS file system is created on WUYING Workspace

    On WUYING Workspace, if an available NAS file system exists in a workspace, the NAS file system is automatically mounted when you create, start, restart, or recreate a cloud desktop in the workspace. If the NAS file system is unmounted or if you want to mount the NAS file system to another path, you can mount the NAS file system again. For more information, see Mount a NAS file system on a Linux cloud computer.