This guide provides instructions on configuring NFS to be used for votedisk (quorum disk) on Oracle Extended RAC. All the commands should be executed as root user on the NFS Server (nsfsrv1 in this guide) except where noted.
Step 1 – Install the following packages: nfs-utils libnfsidmap rpcbind.
Note: If you running NFSv4-only server on Linux 7.1 (kernel-3.10.0-229.el7) or newer, you don’t need to install rpcbind. On older kernel, NFS service will fail to start up without rpcbind.
# yum install nfs-utils libnfsidmap rpcbind
Step 2 – Verify the packages are installed.
# yum list installed nfs-utils libnfsidmap rpcbind
Loaded plugins: langpacks, ulninfo
Installed Packages
libnfsidmap.x86_64 0.25-17.el7 @anaconda/7.4
nfs-utils.x86_64 1:1.3.0-0.48.0.1.el7 @anaconda/7.4
rpcbind.x86_64 0.2.0-42.el7 @anaconda/7.4
Step 3 – >Enable these services on boot.
</pre>
</br>
<p><strong>Step 4</strong> - Start the services.</p>
<pre class="wp-block-code"><code># systemctl start rpcbind
# systemctl start nfs-server
# systemctl start rpc-statd
# systemctl start nfs-idmapd
Step 5 – Create the user who will own the share directory.
Create the group we will need.
# groupadd -g 900 oinstall
Create the user.
# useradd -u 921 -g oinstall -d /home/grid -s /bin/bash grid
Set the password for user grid.
# passwd grid
Step 6 – Set the uid and gid to grid user and oinstall group. all_squash tells NFS that for any user connecting from rac1 and rac2, treat them as uid=anonuid and gid=anongid.
Get the uid and gid for grid.
# id grid
uid=921(grid) gid=900(oinstall) groups=900(oinstall)
Step 7 – Create the share directory.
# mkdir /votedisk
Step 8 – Get the uid and gid for grid.
# id grid
uid=921(grid) gid=900(oinstall) groups=900(oinstall)
Step 9 – Add this to /etc/exports. It will allow rac1 and rac2 to do an nfs mount to the specified directory. It will set the uid and gid to grid user and oinstall group, respectively. all_squash tells NFS that for any user connecting from rac1 and rac2, treat them as uid=anonuid and gid=anongid. Replace rac1 and rac2 with your actual hostnames.
/votedisk rac1(rw,sync,all_squash,anonuid=921,anongid=900) rac2(rw,sync,all_squash,anonuid=921,anongid=900)
Step 10 – Allow access only from rac1 and rac2.
Add these 4 lines to end of /etc/hosts.deny. This will prevent every machine from accessing the nfs mount unless they are specifically allowed in the /etc/hosts.allow.
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
Add these lines to the end of /etc/hosts.allow.
lockd: rac1, rac2
rquotad: rac1, rac2
mountd: rac1, rac2
statd: rac1, rac2
Step 11 – Re-export the new export directory so it take effects.
exportfs -a
Step 12 – On rac1 and rac2, create a new directory to be used for mounting.
mkdir /voting_disk
Step 13 – On rac1 and rac2, add this entry into /etc/fstab. The options are only required for Oracle.
nfssrv1:/votedisk /voting_disk nfs rw,bg,hard,intr,rsize=32768,wsize=32768,tcp,noac,vers=3,timeo=600 0 0
Step 14 – Mount it on rac1 and rac2.
# mount /voting_disk
Step 15 – Verify it is mounted.
# df -h /voting_disk
Filesystem Size Used Avail Use% Mounted on
nsrsrv1:/votedisk 50G 11G 40G 22% /voting_disk
Troubleshooting: If you are not able to access the share, check your firewall settings. You can temporarily turn off firewall to verify it is not the cause of the problem.
To start it back up.# systemctl stop firewalld
# systemctl start firewalld