Ubuntu HPC NFS server setup on infra node
From Notes_Wiki
Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > Ubuntu HPC NFS server setup on infra node
NFS Configuration on Infra Node
This section describes how to create and share a directory using NFS for Slurm cluster clients. The shared folder will reside under /export, mounted from an LVM partition, and made accessible to all compute and service nodes via NFS.
1. Create and Mount LVM Partition
- Create an ext4 LVM partition with the required space to be shared with clients.
- Mount the created LVM partition on /export via UUID using /etc/fstab.
2. Create Base Directories
- Create the home directory inside /export:
mkdir -p /export/home
- You can later add other subdirectories like /export/apps for application binaries, or others as needed.
3. Install NFS Server Packages
apt install -y nfs-kernel-server
4. Configure NFS Exports
- Open /etc/exports file and add the following entry:
/export <private-subnet>(rw,sync,no_subtree_check)
- Example for private subnet 192.168.2.0/24:
/export 192.168.2.0/24(rw,sync,no_subtree_check)
Note:
We are exporting the entire /export directory, not just /export/home.
This gives flexibility to add new folders like /export/apps or others in the future.
If you're using InfiniBand, use the InfiniBand subnet instead of the Ethernet/private subnet in the export entry.
5. Apply Export Changes
exportfs -a
6. Restart the NFS Service
systemctl restart nfs-kernel-server
Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > Ubuntu HPC NFS server setup on infra node