NFS - ciemat-tic/codec GitHub Wiki
NFS server to share disks inside clusters (physical or virtual). In this case, they share "/home". Server is on "slurm-master" and clients in "slurm-clientXX"
#SERVER
#install packages
yum install nfs-utils nfs-utils-lib
#start services
chkconfig nfs on #with this one, it will start on boot
service rpcbind start
service nfs start
#(other option to start on init. Weird but seems to work)
systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
#export home directory
vi /etc/exports
/home 192.168.122.0/24(rw,sync,no_root_squash,no_subtree_check)
#start exporting
exportfs -a
#CLIENTS
#install
yum install nfs-utils nfs-utils-lib
#create folders
mkdir /home
#and mount!
mount slurm-master:/home /home
#add it to /etc/fstab, so it starts at init time
slurm-master:/home /home nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0
Make sure that users and groups have consistent PIDs. In my case,
#/etc/group
munge:x:499:
slurm:x:500:
#/etc/passwd
slurm:x:500:500::/home/slurm:/bin/bash
It may be necessary to reboot master and computing elements to make this work