Mounting NFS Shares on Ubuntu: A Step-by-Step Guide

This guide outlines the process of mounting an NFS share on Ubuntu 24.04, using an Unraid server as the NFS host.

Prerequisites

  • Ubuntu 24.04 (client)
  • Unraid server (NFS host)
  • Root or sudo access on Ubuntu

Step-by-Step Guide

  1. Edit /etc/fstab

Add an entry for the NFS share:

IPADDRESS:/mnt/user/Immich /mnt/immich nfs nfsvers=3,rw,auto 0 0

Replace IPADDRESS with your Unraid server’s IP.

  1. Create Mount Point
sudo mkdir -p /mnt/immich
  1. Install NFS Client
sudo apt update
sudo apt install nfs-common
  1. Mount the Share
sudo mount -a
  1. Verify the Mount
mount | grep immich
ls /mnt/immich

Troubleshooting

If you encounter a “bad option” error:

  1. Ensure nfsvers=3 is in the /etc/fstab entry.
  2. Reload systemd: sudo systemctl daemon-reload
  3. Retry mounting: sudo mount -a

Tips

  • Always backup /etc/fstab before editing.
  • Use sudo systemctl daemon-reload after modifying /etc/fstab.
  • For security, configure firewall rules on both client and server.

Conclusion

Following these steps should successfully mount your NFS share and configure it to connect automatically at startup. If issues persist, consult the Ubuntu or Unraid documentation for more detailed troubleshooting.