예전에 Unix 서버에서 NFS mount 명령을 실행하면 RPC: Program not registered 오류가 발생하는 경우가 있었다.
mount -F nfs -o rw remote_host:/remote_dir /local_dir
(Unix OS마다 mount 명령의 옵션은 조금씩 다를 수 있음)
mount -t nfs remote_host:/remote_dir /local_dir
nfs mount: xxx: : RPC: Program not registered
nfs mount: retrying: /remote_dir
또는
mount: mount to NFS server 'remote_host' failed: RPC Error: Program not registered.
원격 서버의 NFS daemon이 정상적으로 실행되지 않거나, 접근이 불가해서 발생한 문제인데 showmount 명령으로 조회해볼 수 있다.
showmount -e remote_host
또는
rpcinfo -p remote_host
구형 Unix에서뿐만 아니라 현행 Ubuntu에서도 이 명령을 제공하므로 클라이언트에서 이 명령을 실행하여 원격 서버에 접근 가능 여부를 확인해볼 수 있다.
http://manpages.ubuntu.com/manpages/focal/man8/showmount.8.html
NFS 패키지가 설치되어 있지 않으면 이 명령이 존재하지 않으므로 필요한 패키지를 설치할 필요가 있다.
sudo apt install nfs-common nfs-kernel-server
showmount 명령으로 확인해봤는데 접근이 여전히 잘 안 된다면 다음 몇 가지를 확인해볼 필요가 있다.
cat /etc/exports
로 내용 확인하기/home/myaccount/data host1(ro,sync,no_subtree_check),host2(rw)
sudo service nfs-kernel-server restart