Oracle Direct NFS (dNFS) is an optimized NFS client that provides faster and more scalable access to NFS storage in NAS storage devices.
Direct NFS is provided as part of the database kernel, so it can be used on all supported database platforms. It bypasses the NFS driver of the operating system and provides faster performance than the NFS driver of the operating system because it meets all the requests itself it needs.
Enable Direct NFS
You can enable dNFS with the following commands.
1 2 3 |
cd $ORACLE_HOME/lib mv libodm11.so libodm11.so_stub ln -s libnfsodm11.so libodm11.so |
With 11g R2, you can also enable as follows.
1 2 |
cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk dnfs_on |
Disable Direct NFS
You can disable dNFS with the following commands.
1 2 |
cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk dnfs_off |
Direct NFS uses a configuration file named oranfstab to determine which mount directories are available. This file can be in the/etc or $ORACLE_HOME/dbs directories. If this file is not present, it looks for mount directories in the /etc/mtab file.
oranstab:
1 2 3 4 |
server: NFSserver local: 192.168.10.10 path: 192.168.10.163 local: 192.168.10.10 path: 192.168.10.164 export: /export/ORCL mount: /zfssa/ORCL |
server-> an optional name (usually the name of the nfs server)
local-> The interface ip where the client reaches the nfs server
path-> The interface ip of the nfs server
export-> share path on nfs server
mount -> client’s local path
If the path is more than one as above, it will load balancing. If there are more than one interfaces that the NFS server provides , then this is the case . Up to 4 paths can be entered.
After your directory has been mounted, your database must be rebooted to use Direct NFS if your database has a pre-12c version. 12c databases use dNFS by default. When you see the following lines in the alert log file when you restart, it means the database is using dNFS.
1 |
Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 4.0 |
You can use the following query to see the active usage.
1 2 3 4 5 6 7 8 |
SQL> column ID format 99 SQL> column SVRNAME format a15 SQL> column DIRNAME format a15 SQL> select * from v$dnfs_servers; ID SVRNAME DIRNAME MNTPORT NFSPORT WTMAX RTMAX --- --------------- --------------- ---------- ---------- ---------- ---------- 1 192.168.10.155 /export/ORCL 35047 2049 1048576 1048576 |
The views that can be used for Direct NFS are as follows.
v$dnfs_servers | Displays the servers that access using Direct NFS. |
v$dnfs_channels | Displays information about Oracle process connections that are opened to NFS servers. |
v$dnfs_files | Displays files that are currently in use with Direct NFS. |
v$dnfs_stats | Displays information with direct NFS performance statistics. |
To mount the corresponding nfs share, create a directory to mount and add a line in the / etc / fstab file. And mount it with the mount command.
1 |
192.168.10.163:/export/ORCL /zfssa/ORCL nfs rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,nfsvers=3,timeo=600,addr=192.168.10.163 0 0 |
1 2 |
mkdir /zfssa/ORCL mount /zfssa/ORCL |
Mount options vary according to operating systems. You can find out what options should be used on your operating system in the following table. It is recommended to use 1048576 for rsize and wsize values in the table.
Operating System | Mount options for Binaries |
Sun Solaris * | rw,bg,hard,nointr,rsize=32768, wsize=32768,proto=tcp,noac,vers=3,suid |
AIX (5L) ** | rw,bg,hard,nointr,rsize=32768, wsize=32768,proto=tcp,vers=3,timeo=600 |
HPUX 11.23 *** — | rw,bg,vers=3,proto=tcp,noac, hard,nointr,timeo=600, rsize=32768,wsize=32768,suid |
Windows (Use dNFS if needed. Refer to Document 1468114.1 |
Not Supported |
Linux x86 # **** |
rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp, vers=3, timeo=600, actimeo=0 |
Linux x86-64 # **** |
rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,vers=3, timeo=600, actimeo=0 |
Linux – Itanium | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,vers=3, timeo=600, actimeo=0 |
Operating System | Mount options for Oracle Datafiles |
Sun Solaris * | rw,bg,hard,nointr,rsize=32768, wsize=32768,proto=tcp,noac, forcedirectio, vers=3 |
AIX (5L) ** | cio,rw,bg,hard,nointr,rsize=32768, wsize=32768,proto=tcp,noac, vers=3,timeo=600 |
HPUX 11.23 *** — | rw,bg,vers=3,proto=tcp,noac, forcedirectio,hard,nointr,timeo=600, rsize=32768,wsize=32768 |
Windows (Use dNFS if needed. Refer to Document 1468114.1 |
Not Supported |
Linux x86 # **** |
rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,actimeo=0, vers=3,timeo=600 |
Linux x86-64 # **** |
rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,actimeo=0, vers=3,timeo=600 |
Linux – Itanium | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,actimeo=0, vers=3,timeo=600 |
Operating System | Mount options for CRS Voting Disk and OCR (12.1 and lower) |
Sun Solaris * | rw,bg,hard,nointr,rsize=32768, wsize=32768,proto=tcp,vers=3, noac,forcedirectio |
AIX (5L) ** | cio,rw,bg,hard,intr,rsize=32768, wsize=32768,tcp,noac, vers=3,timeo=600 |
HPUX 11.23 *** — | rw,bg,vers=3,proto=tcp,noac, forcedirectio,hard,nointr,timeo=600 ,rsize=32768,wsize=32768 |
Windows (Use dNFS if needed. Refer to Document 1468114.1 |
Not Supported |
Linux x86 # **** |
rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,noac,actimeo=0, vers=3,timeo=600 |
Linux x86-64 # **** |
rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,noac,vers=3, timeo=600,actimeo=0 |
Linux – Itanium | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,noac,vers=3, timeo=600,actimeo=0 |