Mount Command Fails

Missing network security rules

Symptom: Mount commands fail and return errors such as:

mount.nfs: Connection timed out
mount.nfs: Protocol not supported*
*clnt_create: RPC: Port mapper failure - Timed out*

Cause: Network security rules are incorrectly set up or missing.

Solution: Test the connection to the File Storage mount target using the telnet, nc, or ssh utility.

Important

If any of these connection tests fail, verify that the ingress and egress network security rules are set up according to the instructions found in Configuring VCN Security Rules for File Storage.

Testing NFS connectivity using telnet and nc

Testing with Telnet

Run the following telnet commands. Replace the variables in this command with a mount target's IP address and test NFS ports 2048, 2049, 2050, and 111 in succession:

telnet <Mount_Target_IP_address> <port>

A successful connection returns something such as:

Trying <Mount_Target_IP_address>...
Connected to <Mount_Target_IP_address>.
Escape character is '^]'.

A failure returns something such as:

Trying 10.0.0.5...
telnet: connect to address 10.0.0.5: Connection timed out

Testing with nc

Run the following nc commands. Replace the variables in this command with a mount target's IP address and test NFS ports 2048, 2049, 2050, and 111 in succession:

nc -z -v <Mount_Target_IP_address> <port>

A successful connection returns something such as:

Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 10.0.0.5:2048.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.

A failure returns something such as:

Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connection timed out.

Installing telnet and nc

By default, many Oracle Cloud Infrastructure Compute images don't come with telnet and nc utilities installed. To install these utilities on an instance, use the following yum command:

sudo yum install telnet nc -y
Testing connectivity using SSH

If policies don't allow the telnet and nc utilities to be installed, you can use the ssh utility to test connectivity. Replace the variables in this command with a mount target's IP address and test NFS ports 2048, 2049, 2050, and 111 in succession:

ssh <Mount_Target_IP_address> -p <Port>

The response to the ssh command can help identify the possible cause of the mount failure:

  • ssh_exchange_identification: Connection closed by remote host - this is the expected response. It indicates that instance can connect to the mount target without issue.
  • ssh: connect to host 10.0.0.5 port 2048: Connection timed out - this response indicates an inability to connect to the mount target. Verify that the ingress and egress network security rules are set up according to the instructions found in Configuring VCN Security Rules for File Storage.
  • ssh: connect to host 10.0.0.6 port 2048: No route to host - this response indicates that the mount target doesn't exist, or the provided IP address is incorrect.
Testing NFS connectivity from a Windows instance

Use Windows PowerShell to test connectivity from the Windows instance where you're mounting the file system.

  1. From the Start menu, select Windows PowerShell.
  2. Run the following commands in succession:

    Test-NetConnection <mount_target_IP_address> 2048
    Test-NetConnection <mount_target_IP_address> 2049
    Test-NetConnection <mount_target_IP_address> 2050
    Test-NetConnection <mount_target_IP_address> 111

If the output of the preceding commands returns TcpTestSucceeded as True, the connection was successfully established. If the return is False, verify firewall and network security settings.

Network peering configuration incorrect

Symptom: Mount command fails.

Cause: An issue with the peering configuration of the network between the instance and the file system is affecting connectivity. Examples of network peering include:

  • Remote Peering: Same tenancy, different region
  • Local Peering: Same-region, cross-tenancy
  • On-premises network to Oracle Cloud Infrastructure

Solution: Verify that your network peering elements are correctly configured to allow traffic. Some examples of elements that restrict traffic are:

  • Route table source and destination
  • Firewall rules

If you can mount the file system from an instance within the same VCN or subnet, your connection issue is caused by your peering network configuration. For more information, see Networking Overview.

Missing export option

Symptom: Mount command fails with an error such as:

_mount.nfs: mount(2): No such file or directory
_mount.nfs: Protocol not supported

Cause: No export option is specified for the export you're using in the mount command.

Solution: There must be at least one export option in the export you use to mount the file system. See Working with NFS Exports and Export Options and refer to the Editing an Export and Export Options for more information.

Mount command is incorrect or includes a typo

Symptom: Mount command fails with an error such as:
 _mount.nfs: mount point <mount_point> does not exist_
or
 _mount.nfs: mounting <MountTarget>:<ExportPath> failed, reason given by server: No such file or directory

Cause: The information in the mount command is incorrect or there's a typo in it.

Solution: Verify that the information in your mount command is correct:

  • Verify that the mount point directory exists. If not, create it.
  • Verify that there's no typo in the mount point in the mount command.
  • Verify that the export path in the mount command doesn't contain a typo, and the spelling and case is the same as in the export.
Tip

If there's a typo in the mount point, the system reports that the mount point doesn't exist.

If there's a typo or a case mismatch in the export path, the system reports that the path doesn't exist.

The export path is specified when you create an export for the file system in a mount target. It uniquely identifies the file system within the mount target, letting you associate multiple file systems to a single mount target. The export path is appended to the mount target IP address, and used to mount the file system. For example:

sudo mount 10.0.0.5:/example/path /mnt/mountpointA

In this example, 10.0.0.5: is the mount target IP address, and /example/path is the export path. /mnt/mountpointA is the path to the directory on the client instance on which the external file system is mounted.

Tip

You can find all the export paths for a file system in the Exports list shown in its Details page, together with associated mount target information.
  • You can obtain the correct export path by copying mount commands directly from the file system export. These commands minimize the chance of a typing error. See Getting Mount Command Samples for more information.
  • If one file system associated with a mount target uses an export path of '/', it prevents you from associating more file systems with that mount target. No two file systems associated with the same mount target can have an export path that contains a complete path of the other.

See Paths in File Systems for more information.

Mount command using an FQDN fails, but succeeds with an IP address

Symptom: Mounting a file system using an FQDN in the mount command fails, but mounting with an IP address succeeds.

Cause: If the mount target has a hostname specified, the File Storage service creates an FQDN for it and includes it in the mount command sample for the file system. Be sure that the FQDN correctly resolves to the mount target's IP address. For more information about DNS resolution, see DNS in Your Virtual Cloud Network.

A third-party security module on the instance restricts NFS mounting

Symptom: Mount command fails. The dmesg operation displays a message like the following, which can vary depending on the module:

Redirecting File System Framework Version 0.10 <www.redirfs.org> with TrendMicro Patch...

Cause: The security module, such as TrendMicro Deep Security Agent, has mount hooks that can interfere with NFS.

Solution: Stop the ds_agent by running the following command:

/etc/init.d/ds_agent stop