Difference between revisions of "NFS client setup on compute nodes"

From Notes_Wiki
(Created page with "Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > 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 === <pre> apt install -y nfs-common </pre> === b. Create Mount Point === <pre> mkdir /exp...")
 
(Blanked the page)
Tag: Blanking
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[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 ===
<pre> apt install -y nfs-common </pre>
=== b. Create Mount Point ===
<pre> mkdir /export </pre>
=== c. Verify NFS Export from Master ===
<pre> showmount -e master # OR showmount -e master-ib </pre>
=== d. Configure Persistent Mount in /etc/fstab ===
Add the following line to /etc/fstab:
<pre> <master-node-name>:/export /export nfs defaults,nofail,soft,bg 0 0 </pre>
'''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 ===
<pre> mount -a </pre>
== 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 ===
<pre> lxc config set slurm-login1 security.privileged true </pre>
=== b. Restart Container ===
<pre> lxc stop slurm-login1 lxc start slurm-login1 </pre>
=== c. Attach /export/home to Container ===
<pre> lxc config device add slurm-login1 export_home disk source=/export/home path=/export/home </pre>
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.
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[NFS client setup on compute nodes]]

Latest revision as of 12:17, 6 June 2025