All Products
Search
Document Center

When mounting NAS on an ECS instance in Linux, the system prompts "mount: can't find/root/nas in/etc/fstab" error.

Last Updated: Sep 21, 2020

Problem description

Log on to the Linux server and run the following command to Mount NAS through NFS.

Mount-t nfs-o vers = 0xxxxxx.nas.aliyuncs.com: // root/nas

The following error message is displayed.

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

 

Causes

The command format is incorrect.

 

Solution

  1. Check command DiscoveryVers = 0xxxxxx.nas.aliyuncs.com :/The parameter is invalid.
  2. Run the following command to perform rollback:
    Mount-t nfs-o vers = 4 xxxxxx.nas.aliyuncs.com: // root/nas
    Note:Vers = 4The NFS 4.0 protocol is used for mounting parameters.
  3. Run the following command to confirm that the hotfix package has taken effect:
    df -h
    A similar output is displayed.
    1526896945768-06b06ec8-2a9d-4fae-9120-c2f5acb4d89a.png

 

References

The basic format of the mount isMount [-t vfstype] [-o options] device dir.

  • The "-t vfstype" parameter specifies the file system type. Generally, file formats include the following.
    • CD or CD Image: windows660.
    • DOS fat16 file system: msdos.
    • Windows 9x fat32 file system: vfat.
    • Windows NT ntfs file system: ntfs.
    • Windows File network sharing: smbfs.
    • File network sharing in UNIX (LINUX): nfs.
  • -O options is used to describe how a device or file is mounted. Common parameters include the following.
    • Loop: used to mount a file to the system as a hard disk partition.
    • Ro: Mount devices in read-only mode.
    • Rw: mount the device in read/write mode.
    • Iocharset: specifies the character set used to access the file system.
    • Vers: the version of the file system.
  • "Device" indicates the device to be mounted.
    • Dir: The mount point of the device on the system ).

 

Application scope

  • ECS