High-Performance Computing Setup – Part I - Network File System and Module Management Configuration
Install environment-modules on your head node.
sudo apt-get install environment-modules
source /usr/share/modules/init/bash >> /etc/profile
export MODULEPATH=$MODULEPATH:/opt/module_file/
Install nfs-kernel-server
on your head node and nfs-common
on your compute node.
For head node
apt install nfs-kernel-server
For compute node
apt install nfs-common
Configure the shared dir from your head node by modifying /etc/exportfs
.
/opt 192.168.1.0/24(ro,sync,no_subtree_check)
/home 192.168.1.0/24(rw,sync,no_subtree_check)
/scratch 192.168.1.0/24(rw,sync,no_subtree_check)
Run the following command to make the settings take effect.
/sbin/exportfs -ra
Mount the shared dir in compute node.
mount j35a:/opt /opt
mount j35a:/home /home
mount j35a:/scratch /scratch
Setup auto mount by editing /etc/fstab
.
Add user with user id and the same group id. This has to be done on very node (head node an compute nodes)
/sbin/adduser -u 1002 chenxi
/sbin/adduser -u 1003 nam
/sbin/adduser -u 1004 jianghong
/sbin/adduser -u 1005 guanming
/sbin/adduser -u 1006 chengxi
/sbin/adduser -u 1007 ningwen
/sbin/adduser -u 1008 junbo
/sbin/adduser -u 1009 haoyang
/sbin/adduser -u 1010 choi
Create a dir in shared /scratch links for every user and give them permision. This only need to be done on head node.
Example.
cd /scratch
mkdir chenxi
chown chenxi:chenxi ./chenxi
ln -s /scratch/chenxi /home/chenxi/scratch