Friday, May 27, 2016

mount to NFS server failed: RPC Error: Program not registered.

Mounting to an NFS location was failing with following error. This was an existing NFS mount location which worked fine earlier.
mount -t nfs -o rw,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,nolock,actimeo=0 nfs-server:/home/oracle/backup/ /home/oracle/dbbackup
mount: mount to NFS server 'nfs-server' failed: RPC Error: Program not registered.
Showmount to the nfs-server also fails with
showmount -e nfs-server
mount clntudp_create: RPC: Program not registered
To fix this restart the nfs related services in the following order on the nfs server. First rpcbind service
[root@nfs-server ~]# service rpcbind start
Starting rpcbind:                                          [  OK  ]
Second the nfs service
[root@nfs-server ~]# service nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]
Finally the portmap service
[root@nfs-server ~]# service portmap start
Starting portmap:                                          [  OK  ]


Afterwards NFS mount works without issue
# mount -t nfs -o rw,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,nolock,actimeo=0 10.10.0.102:/home/oracle/backup/ /home/oracle/dbbackup
# df -h
Filesystem            Size  Used Avail Use% Mounted on

xx.xx.x.xxx:/home/oracle/backup/
                      526G  407G   93G  82% /home/oracle/dbbackup
Related Posts
RMAN Backups on NFS
Direct NFS Setup