Configuring Oracle dNFS
Oracle Direct NFS (dNFS) is the NFS client functionality directly integrated into the Oracle RDBMS server. Oracle dNFS makes the task of configuring an Oracle database on NAS storage like FlashBlade much simpler in comparison to Standard NFS (aka Kernel NFS).
Enabling Oracle Direct NFS (dNFS) client
To enable Oracle dNFS on a database host, perform the following steps.
1. Shut down the running instance of the Oracle database software.
2. Change the directory to $ORACLE_HOME/rdbms/lib
3. Enable dNFS by running the following command.
$ make -f ins_rdbms.mk dnfs_on
- The server parameter refers to the name of the FlashBlade storage. This name is for informational use only and not validated.
- The local parameter refers to the paths on the database host, specified either by IP address or by name as displayed using the ifconfig command
- The path parameter should reflect the data VIP address(es) of the FlashStorage.
- Oracle supports up to 4 paths
- The nfs_version should refer to nfsv3 as at this time FlashBlade supports only the V3 of the NFS protocol.
- The export parameters should reflect the mount points similar to the entries created in /etc/fstab but do not include any mount options.
- Keywords (server, local, path, nfs_version, export, mount) should be immediately followed with ":" without any spaces.
- The values should have a space after the ":"
- Always group local and path together on the same line. Similarly group export and mount together on the same line.
server: fb-dnfs-test-01 local: 192.168.20.50 path: 192.168.20.100 nfs_version: nfsv3 export: /oradata01 mount: /u02 export: /oradata02 mount: /u03 export: /redo01 mount: /u04 server: fb-dnfs-test-02 local: 192.168.10.25 path: 192.168.10.200 nfs_version: nfsv3 export: /rman01 mount: /r01 export: /rman02 mount: /r02
Sample oranfstab for multiple data VIP at the FlashBlade level. Limit to four paths.
server: fb-dnfs-test-01 local: 192.168.20.50 path: 192.168.20.100 local: 192.168.20.50 path: 192.168.20.101 local: 192.168.20.50 path: 192.168.20.102 local: 192.168.20.50 path: 192.168.20.103 nfs_version: nfsv3 export: /oradata01 mount: /u02 export: /oradata02 mount: /u03 export: /redo01 mount: /u04
5. Restart the Oracle database instance(s).
Note: The mount points referred to in the oranfstab file should be mounted on the system(s) by invoking the mount command directly or more commonly through an entry in the /etc/fstab file.
Disabling the Oracle Direct NFS (dNFS) client
1. Shut down the running instance of the Oracle database software.
2. Change the directory to $ORACLE_HOME/rdbms/lib.
3. Disable dNFS by running the following command.
make -f ins_rdbms.mk dnfs_off
4. Restart the Oracle database instance(s).
Verifying the use of Oracle Direct NFS client
1) If dNFS is enabled, the alert.log will show the following entry when the database is started.
Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 4.0
2) Query the dNFS server information from v$dnfs_servers view inside the database.
SQL> select svrname, dirname, mntport, nfsport, wtmax, rtmax from v$dnfs_servers; SVRNAME DIRNAME MNTPORT NFSPORT WTMAX RTMAX ------------------ -------------------- ---------- ---------- ---------- ---------- fb-dnfs-test-02 /rman01 2049 2049 524288 524288
Note: Even though dNFS is enabled, Oracle only mounts the volume/filesystem and opens the files when they are accessed. If no data files are accessed, then the above view will return no rows.
Troubleshooting oranfstab issues
Please make sure the svrname from the v$dnfs_servers show the server name from the oranfstab file. If not, generally there is some misconfiguration in the oranfstab file. Look for any dangling entries, lack of space after the keywords and clean up.
For example, in the following output the SVRNAME is not correct as it should be the actual server name from the oranfstab for all the exports under the given server but we see the IP addresses of the paths. This means the oranfstab is not configured correctly.
SQL> SELECT svrname, dirname, mntport, nfsport, wtmax, rtmax FROM v$dnfs_servers; Server Export Name MNTPORT NFSPORT WTMAX RTMAX ------------------------- ---------------------------------------------------------------- ---------- ---------- ---------- ---------- 192.168.20.100 /oradata01 2049 2049 524288 524288 192.168.20.101 /oradata02 2049 2049 524288 524288 192.168.20.102 /redo01 2049 2049 524288 524288
Looking at the oranfstab file, we see the following.
server: fb-dnfs-01 local: 192.168.20.50 path: 192.168.20.100 local: 192.168.20.50 path: 192.168.20.101 local: 192.168.20.50 path: 192.168.20.102 local: 192.168.20.50 nfs_version: nfsv3 export: /oradata01 mount: /u02 export: /oradata02 mount: /u03 export: /redo01 mount: /u04
After rearranging them and removing the dangling local entry from the oranfstab file and restarting the database shows the expected output.
server: fb-dnfs-01 local: 192.168.20.50 path: 192.168.20.100 local: 192.168.20.50 path: 192.168.20.101 local: 192.168.20.50 path: 192.168.20.102 nfs_version: nfsv3 export: /oradata01 mount: /u02 export: /oradata02 mount: /u03 export: /redo01 mount: /u04
SQL> SELECT svrname, dirname, mntport, nfsport, wtmax, rtmax FROM v$dnfs_servers; Server Export Name MNTPORT NFSPORT WTMAX RTMAX ------------------------- ---------------------------------------------------------------- ---------- ---------- ---------- ---------- fb-dnfs-01 /oradata01 2049 2049 524288 524288 fb-dnfs-01 /oradata02 2049 2049 524288 524288 fb-dnfs-01 /redo01 2049 2049 524288 524288