Ubuntu HPC NFS client setup on compute nodes
From Notes_Wiki
Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > Ubuntu HPC NFS client setup on compute nodes
Mounting NFS on Cluster Nodes
This section explains how to mount the shared /export directory on all compute nodes, login node, and the master node in a Slurm cluster.
1. For Compute Nodes (Bare Metal or VMs)
a. Install NFS Client Packages
apt install -y nfs-common
b. Create Mount Point
mkdir /export
c. Verify NFS Export from Master
showmount -e master # OR showmount -e master-ib
d. Configure Persistent Mount in /etc/fstab
Add the following line to /etc/fstab:
<master-node-name>:/export /export nfs defaults,nofail,soft,bg 0 0
Notes:
- Use nofail to allow booting even if NFS is not available.
- Use soft and bg to ensure mounting happens in the background and retries without blocking the boot.
- If using InfiniBand, replace <master-node-name> with the corresponding InfiniBand hostname (e.g., master-ib).
- You can optionally add the async mount option to improve performance (at the cost of consistency), depending on your HPC workload requirements.
e. Mount All Entries
mount -a
2. For Containers (slurm-login1, slurm-master) on Infra Node
Since the login node and master node are LXD containers running on the infra (NFS) node, we do not use NFS clients to mount /export. Instead, use LXD disk device passthrough from the host (infra node):
Steps (Run from Infra Node):
a. Enable Privileged Container
lxc config set slurm-login1 security.privileged true
b. Restart Container
lxc stop slurm-login1 lxc start slurm-login1
c. Attach /export/home to Container
lxc config device add slurm-login1 export_home disk source=/export/home path=/export/home
Repeat similar steps for slurm-master and any other container that needs access to /export/home.
Note:
- This ensures that containers running on the infra node share the same /export/home directory via direct host path mapping instead of NFS mount.
- This method is faster and avoids networking overhead between containers and host.
Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > Ubuntu HPC NFS client setup on compute nodes