首页 File Storage NAS User Guide File system mounting FAQ about mounting FAQ about mount command parameter settings

FAQ about mount command parameter settings

更新时间: 2025-12-30 19:29:56

This topic describes common issues with mount command parameters when you mount a file system.

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

If a network transition or a backend service high availability (HA) switchover occurs, there is a small chance that the NFS file system may hang. If this happens, the connection may take several minutes to recover automatically. In extreme cases, you may need to restart the ECS instance to recover the connection. If you use the noresvport parameter, recovery is automatic and takes only a few seconds.

How do I check and fix issues with the noresvport mount parameter?

Note

This section applies only to Linux users. Windows users and users who use NAS through the Container Storage Interface (CSI) or FlexVolume plug-in in Container Service for Kubernetes (ACK) can ignore this section.

  1. Check whether the file system is mounted with the noresvport parameter.

    1. Run the following command on your 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 check script. The following commands use Python as an example.

      python2.7 /tmp/check_noresvport.py

      If the script output is "This ECS instance does not need to handle the noresvport issue", no action is required. Otherwise, perform the following steps to resolve the issue.

  2. Fix the noresvport parameter.

    Note

    Perform this fix during off-peak hours.

    Choose a fix based on your mount scenario:

    • If you mount NAS directly on an ECS instance, run the check script again with the -r parameter.

      python2.7 /tmp/check_noresvport.py -r
    • If you mount NAS on a container, run the check script again with the -c parameter.

      python2.7 /tmp/check_noresvport.py -c
  3. Update the automatic mount configuration.

    • If you configured automatic mount, update the mount parameters to include the noresvport parameter. For more information, see Mount an NFS file system.

    • If you have not configured automatic mount, skip this step.

    After the fix is complete, run Step 1 again to confirm that the issue is resolved. If the issue persists, submit a ticket.

What can cause a network transition or a backend service HA switchover?

NAS is a stable service. Network transitions and backend service HA switchovers are rare. Backend service upgrades can trigger these switchovers, but the probability of a client hang is low. Before an upgrade, the Alibaba Cloud NAS team notifies users of affected clusters in advance. This provides enough time to apply the noresvport parameter. Other scenarios that can trigger a switchover include Server Load Balancer adjustments and server-side hardware failures. These events are somewhat unpredictable. Therefore, even if no service upgrades are scheduled, you should use the noresvport parameter as soon as possible to avoid this risk.

Why do I need to remount? Are there other solutions?

You need to remount to disconnect TCP connections that were established without the noresvport parameter. When you mount with the noresvport parameter, new TCP connections are created. To disconnect the old TCP connections, you must stop all NAS-related services and then run the umount command to unmount the file system.

If you do not want to remount, you can create a new NAS mount target. Mount it to a new local path using the noresvport parameter. Then, gradually migrate your business processes to the new path. Finally, delete the old mount path and mount target.

How do I specify mount parameters when using the one-click mount feature in the console?

The console automatically adjusts the default mount parameters to the optimal configuration based on the protocol version and NAS file system type. If you have no special requirements, use the default parameters. Modifying the default parameters may cause the mount to fail.

If your business scenario requires you to modify the default parameters, submit a ticket.

Why do new protocol types or mount parameters not take effect when using the one-click mount feature?

If the specified mount path is already in use, new protocol types and mount parameters are ignored. First, unmount the file system from the mount path. Then, mount the file system again with the new protocol type and mount parameters.

My business scenario requires changing the default mount parameters. How do I do it?

In most scenarios, you do not need to specify default mount parameters. Leave the mountparam parameter empty. To use special mount parameters, specify the full mount parameters in the mountparam parameter. You must include noresvport and specify the protocol type as vers=3 or vers=4,minorversion=0. When you run the mount script, if a custom value is specified for the mountparam parameter, the value of the protocoltype parameter is ignored by the script. For more information, see Metric description.

What are the risks of the x-systemd.automount parameter in /etc/fstab?

If you configure the x-systemd.automount mount option in the /etc/fstab file on a Linux operating system, data on NAS may be unexpectedly modified or deleted.

This is because after you configure x-systemd.automount, the Linux operating system triggers a file system mount the first time you access the local mount directory. Even if you previously unmounted the file system using the umount command, accessing the local directory again triggers an automatic mount.

To prevent unexpected data changes, do not use this option. To disable this configuration, delete the line that contains x-systemd.automount from the /etc/fstab file. Then, reconfigure automatic mount on startup as described in Mount an NFS file system. After the configuration is complete, restart the ECS instance for the changes to take effect.

上一篇: Troubleshoot file read and write access issues 下一篇: Migrate a NAS classic network mount target to a VPC
阿里云首页 文件存储 NAS 相关技术圈