NFS on RHEL/Rocky/AlmaLinux - Quick Start Guide

Linux

Audience
Public
Product
FlashBlade
FlashArray
Technology Integrations
Linux
Source Type
Documentation
Note:

For detailed explanations and alternative configurations: See NFS Best Practices.

Important:

Vendor Documentation Priority: This guide is for reference only. Always consult official vendor documentation for your distribution. Test thoroughly in a lab environment before production use.

Pre-requisites:

  • RHEL 8.x/9.x, Rocky Linux 8/9, AlmaLinux 8/9

  • Everpure FlashArray with:

    • NFS file interface configured

    • NFS export policy created with NFSv4.1 enabled (recommended)

    • Export path created (e.g., /data/rhel)

    • No root squash enabled for client IPs

    • Dedicated storage network interfaces (recommended)

    • Root or sudo access

  1. Install NFS Client:
    # Install NFS utilities
    sudo dnf install -y nfs-utils
    
    # Enable and start required services
    sudo systemctl enable --now nfs-client.target
    sudo systemctl enable --now rpcbind
  2. Verify Network Connectivity:
    # Test connectivity to NFS server
    ping -c 3 <NFS_SERVER_IP>
    
    # Test NFS port (2049) - use one of these methods:
    # Method 1: Using bash (works on all distributions)
    timeout 3 bash -c '</dev/tcp/<NFS_SERVER_IP>/2049' && echo "NFS port 2049 is open"
    
    # Method 2: Using nc (may require installation)
    # RHEL/Rocky/Oracle: dnf install nmap-ncat
    nc -zv <NFS_SERVER_IP> 2049
    
    # List available exports (optional - may not be available on all distributions)
    # RHEL/Rocky/Oracle: included with nfs-utils
    showmount -e <NFS_SERVER_IP>
  3. Configure Firewall:
    # Allow NFS client traffic (outbound typically allowed by default)
    # If using strict firewall rules:
    sudo firewall-cmd --permanent --add-service=nfs
    sudo firewall-cmd --permanent --add-service=rpc-bind
    sudo firewall-cmd --reload
  4. Create Mount Point and Mount NFS:
    # Create mount point
    sudo mkdir -p /mnt/pure-nfs
    
    # Mount with recommended options
    sudo mount -t nfs4 -o vers=4.1,nconnect=4,noatime,nodiratime \
        <NFS_SERVER_IP>:/data/rhel /mnt/pure-nfs
    
    # Verify mount
    mount | grep nfs
    df -h /mnt/pure-nfs
  5. Configure Persistent Mount:

    Add to /etc/fstab for automatic mounting at boot:

    # Add fstab entry
    echo '<NFS_SERVER_IP>:/data/rhel /mnt/pure-nfs nfs4 vers=4.1,hard,timeo=300,retrans=2,nconnect=4,noatime,nodiratime,_netdev 0 0' | sudo tee -a /etc/fstab
    
    # Test fstab entry
    sudo umount /mnt/pure-nfs
    sudo mount -a
    
    # Verify
    mount | grep nfs
    Note:

    Recommended Options:

    • vers=4.1: NFSv4.1 for session recovery during controller failover
    • hard: Retry indefinitely during failover (prevents I/O errors). Do not use soft : it causes I/O errors after ~180 seconds and risks data corruption
    • timeo=300,retrans=2 : 30-second timeout, ~90 seconds total before major retry (exceeds FlashArray <30s failover target)
    • nconnect=4: Multiple TCP connections for improved throughput (values 4-8 recommended)
    • noatime,nodiratime: Don't update access times, reducing metadata I/O
    • _netdev: Wait for network before mounting

    During failover: With hard mount, I/O pauses briefly, then resumes automatically, with no errors returned to applications.

  6. Verify NFS Mount:
    # Check mount options
    mount | grep nfs
    
    # Verify nconnect is active
    cat /proc/fs/nfsfs/servers
    
    # Test read/write
    echo "NFS test" | sudo tee /mnt/pure-nfs/test.txt
    cat /mnt/pure-nfs/test.txt
    sudo rm /mnt/pure-nfs/test.txt
Note:

Quick Reference:

Task Command
Show exports showmount -e <server>
Mount NFS mount -t nfs4 <server>:<export> <mountpoint>
Unmount NFS umount <mountpoint>
NFS statistics nfsstat -c
Mount info nfsstat -m

Troubleshooting:

Mount Fails

# Check network connectivity
ping <NFS_SERVER_IP>
nc -zv <NFS_SERVER_IP> 2049

# Check exports
showmount -e <NFS_SERVER_IP>

Performance Issues

# Check NFS version and options
nfsstat -m

# Verify nconnect
cat /proc/fs/nfsfs/servers

SELinux-specific:

# Check SELinux (if enabled)
sudo setsebool -P use_nfs_home_dirs 1

For production deployments, see NFS Best Practices for:

  • Network bonding and redundancy

  • Performance tuning with nconnect

  • SELinux configuration

  • Monitoring and troubleshooting

Related Guides: