Difference between revisions of "NFS server setup with linux containers"
From Notes_Wiki
(Created page with "Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > NFS server setup with linux containers Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > NFS server setup with linux containers") |
|||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[NFS server setup with linux containers]] | [[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[NFS server setup with linux containers]] | ||
= 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: | |||
<pre> mkdir -p /export/home </pre> | |||
: You can later add other subdirectories like /export/apps for application binaries, or others as needed. | |||
== 3. Install NFS Server Packages == | |||
<pre> apt install -y nfs-kernel-server </pre> | |||
== 4. Configure NFS Exports == | |||
: Open /etc/exports file and add the following entry: | |||
<pre> /export <private-subnet>(rw,sync,no_subtree_check) </pre> | |||
: Example for private subnet 192.168.2.0/24: | |||
<pre> /export 192.168.2.0/24(rw,sync,no_subtree_check) </pre> | |||
'''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 == | |||
<pre> exportfs -a </pre> | |||
== 6. Restart the NFS Service == | |||
<pre> systemctl restart nfs-kernel-server </pre> | |||
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[NFS server setup with linux containers]] | [[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[NFS server setup with linux containers]] |
Revision as of 07:40, 6 June 2025
Home > Ubuntu > Ubuntu HPC setup with slurm and linux containers > NFS server setup with linux containers
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 > NFS server setup with linux containers