nfs share facing a connection issues

Shing Fan LEE 20 Reputation points
2026-06-30T15:43:08.2966667+00:00

We have one mount on nfs having a connectivity issues

Azure Files
Azure Files

An Azure service that offers file shares in the cloud.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-30T15:43:22.5433333+00:00

    For connectivity issues to an NFS Azure file share, validate these key areas on the Linux client and in Azure:

    1. Verify NFS client packages are installed
      Azure Files NFS requires the appropriate NFS utilities on the client:
      • RHEL/CentOS/Oracle Linux:
             sudo rpm -qa | grep nfs-utils
        
        If missing:
             sudo yum install nfs-utils      # OS 7.x
             sudo dnf install nfs-utils      # OS 8.x or 9.x
        
      • SLES:
             sudo rpm -qa | grep nfs-client
        
        If missing:
             sudo zypper install nfs-client
        
      • Ubuntu/Debian:
             sudo dpkg -l | grep nfs-common
        
        If missing:
             sudo apt update
             sudo apt install nfs-common
        
    2. Check network path and firewall (port 2049)
      NFS uses TCP port 2049. Ensure the client can reach the Azure Files NFS endpoint:
         sudo nc -zv <storageaccountname>.file.core.windows.net 2049
      
      • If this fails, open outbound TCP 2049 on any local firewall and verify NSGs and network devices allow this traffic to the storage account.
    3. Confirm trusted network / endpoint configuration
      NFS Azure file shares rely on network-based access control:
      • Use service endpoints or private endpoints for access.
      • For on-premises access, use VPN or ExpressRoute with private endpoints for more secure connectivity.
      • With private endpoints, ensure:
        • The VM’s virtual network/subnet is associated with the private endpoint.
        • Private DNS integration is correctly configured so the storage account name resolves to the private IP.
    4. Validate encryption-in-transit settings vs mount method
      If the storage account has:
      • Secure transfer required and/or
      • Require encryption in transit for NFS
      then:
      • Native NFS client mounts will fail; use the AZNFS Mount Helper to mount the share.
      • Alternatively, disable both Secure transfer required and Require encryption in transit for NFS if encryption in transit is not required.
    5. Use correct NFS mount options (Azure Files NFS)
      When mounting, ensure the options match Azure Files requirements, for example:
      • vers=4 and minorversion=1 (Azure Files supports NFSv4.1 only).
      • sec=sys (AUTH_SYS using local UNIX UIDs/GIDs).
      • Recommended performance options: rsize=1048576, wsize=1048576, actimeo=30-60, nconnect=4.
      • For kernels before 5.18, use noresvport to improve reconnection behavior.
    6. Check for storage account deletion if timeouts occur
      If mounts fail with connection timed out, verify the storage account still exists. If it was deleted and recovered, recreate the private endpoint so it points to the new resource ID.
    7. Kernel version issues (directory listing hangs)
      If ls or directory enumeration hangs on large directories:
      • Linux kernel v5.11–v5.12.4 has a bug causing endless READDIR sequences.
      • Upgrade or downgrade the kernel outside this range (for example, RHEL 8.4 uses the affected kernel).

    If the issue persists after these checks, focus on verifying endpoint configuration (service vs private), DNS resolution to the correct endpoint, and whether encryption-in-transit settings align with the chosen mount method (native NFS vs AZNFS helper).


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.