配置NFS - lyulyul/shine-cluster GitHub Wiki

基本上按照 https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-20-04

sudo apt install -y nfs-common
sudo mkdir /home/shared
echo "aha.ipm.edu.mo:/home/shared /home/shared nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0" | sudo tee -a /etc/fstab

修复uid、gid(ID mapping)

https://unix.stackexchange.com/a/464950/77141

但是要求aha和eureka上的账户名相同。

https://www.freeipa.org/page/Main_Page

run sudo visudo, add the following

# admin on aha will use ssh to access this node and create user
# NOPASSWD makes this process automatable
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/adduser

https://toroid.org/sudoers-syntax

sudo mkdir /home/shared
sudo chmod 755 /home/shared

Synology NAS配置

如果client出现以下错误

$ sudo mount -t nfs bespin:/volume2/compute-opt /opt
$ cd /opt
cd: permission denied: opt

说明mount成功了,但当前用户没有权限浏览/opt。应检查Synology的Shared Folder,Squash of NFS Permissions may need to be changed to "Map all users to admin".