Skip to content

NFS Server on the Controller (old)

Archived — outdated

server02 used to host the NFS export for /hdd/slurm_users/home itself. Storage has since moved off server02, and it's now just an NFS client like every other node — see Controller: NFS. Kept here in case server02 ever needs to go back to being an NFS server.

NFS Shared Storage (Server)

sudo apt install nfs-kernel-server nfs-common rpcbind

Make the directory to share over the network:

sudo mkdir slurm_users
cd slurm_users
sudo mkdir home
sudo chmod 777 home

Edit /etc/exports and add the location and client IP:

sudo nano /etc/exports
/hdd/slurm_users/home 10.22.188.21(rw,sync,no_subtree_check)

When adding the login node to the export file, add the no_root_squash flag:

<login-node-ip>(rw,sync,no_subtree_check,no_root_squash)

After editing /etc/exports, refresh with:

sudo exportfs -ra

Note

When adding a new client (login node or worker), you need to add its IP here too.

Disk Quota Setup

One-time setup to enable disk quotas for SLURM users on the XFS RAID storage system — see Disk Quotas (XFS, old) for the full, also-archived version of this.

Note

Some commands may differ if the filesystem is ext4 instead of XFS.

Verify your RAID storage setup:

# Check filesystem type
sudo blkid /dev/md0

# Check current mount
mount | grep raid_storage

Edit /etc/fstab to include XFS quota options:

# Before:
/dev/md0 /raid_storage xfs defaults 0 0

# After:
/dev/md0 /raid_storage xfs defaults,usrquota,grpquota 0 0

Remount (stop NFS first if the filesystem is busy):

sudo systemctl stop nfs-kernel-server
sudo umount /raid_storage
sudo mount /raid_storage
sudo systemctl start nfs-kernel-server

Enable XFS quotas:

sudo xfs_quota -x -c 'enable -uv' /raid_storage
sudo xfs_quota -x -c 'enable -gv' /raid_storage

Day-to-day quota changes went through the squota tool — see squota Tool.