All Products
Search
Document Center

File Storage NAS:FAQ about parameter settings of the mount command

Last Updated:Nov 06, 2024

This topic provides answers to some frequently asked questions (FAQ) about the parameters in the mount command when you mount a 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 File Storage NAS (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 Elastic Compute Service (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 (containing the -r parameter) 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 (containing the -c 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.

    • If an automatic mount is configured, add the noresvport parameter to the settings of the automatic mount. For more information, see Mount an NFS file system.

    • If no automatic mount is configured, skip this step.

    After you complete the preceding steps, repeat Step 1 and verify the result. If the issue persists, submit a ticket.

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 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, submit a ticket.

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.

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 of 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.

What risks may arise if I configure the x-systemd.automount option in the /etc/fstab file on Linux?

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

This is because after you configure the x-systemd.automount option, the Linux operating system triggers automatic mount of file systems when you access the local mount directory for the first time. Automatic mount is still triggered even if you have run the umount command to unmount file systems and then access the local mount directory.

To prevent unexpected data changes, we recommend that you do not use the x-systemd.automount option. To disable the option, remove the configuration line that contains x-systemd.automount from the /etc/fstab file. Then, you can reconfigure automatic mount at startup based on the steps described in Mount an NFS file system. After you complete the configuration, restart your ECS instance.