Direct NFS(DNFS) has been introduced from Oracle 11g. It integrates the NFS client functionality directly in the Oracle software. With DNFS Oracle can optimize the I/O path between Oracle and the NFS server providing significantly superior performance. It simplifies, and in many cases automates, the performance optimization of the NFS client configuration for database workloads. In addition, it can be implemented for multipathing over four parallel ports, independently from any switches, NIC bonding or teaming.
NFS Client: mentor (192.168.1.251)
Share dir: /u01/share
Mount point: /nfs
Make sure host name ocm and mentor are resolvable. If not add host entry on /etc/hosts file.
192.168.1.251 mentor mentor.localdomain
192.168.1.252 ocm ocm.localdomain
Server = name of the server this name may be anything
Environment:
NFS Server: ocm (192.168.1.252)NFS Client: mentor (192.168.1.251)
Share dir: /u01/share
Mount point: /nfs
Make sure host name ocm and mentor are resolvable. If not add host entry on /etc/hosts file.
192.168.1.251 mentor mentor.localdomain
192.168.1.252 ocm ocm.localdomain
Create share point
mkdir /u01/share
Add following entry on /etc/export
cat >> /etc/exports
/u01/share 192.168.1.251(rw,async,no_wdelay,insecure,root_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)
NFS Client:
Create mount point on the nfs Client
mkdir /nfs
Add following entry on nfs client.
ocm:/u01/share /nfs nfs rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0 0 0
Mount nfs share.
mount /nfs
shutdown the Oracle database.
Change directory to ORACLE_HOME/rdbms/lib and execute make command
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk dnfs_on
Start Oracle database.
startup
Oracle binary file oradism should owned by root and has setuid verify with command below.
Configure oranfstab file
cd $ORACLE_HOME/dbs
cat > oranfstab
server: ocm
local: 192.168.1.251
path: 192.168.1.252
export: /u01/share mount: /nfs
Server = name of the server this name may be anything
local = IP address of the client
Path = IP address of the server
export = Path exported from nfs server
mount = Mount point on the nfs Client
Create a directory on the shared location to place the oracle datafiles. Make sure permission and ownership of the directory is oracle.
cd /u01/share/
ls
mkdir oradata
chown -R 1001:1001 oradata/
Still following SQL command will return no rows selected. To enable and configure DNFS UP we have to create a tablespace on the shared drive.
select * from v$dnfs_servers;
select * from v$dnfs_files;
Create tablespace on the nfs directory.
Create tablespace tbs_dnfs
datafile '/nfs/oradata/tbs_dnfs01.dbf'
We can check alert log and find that the DNFS is UP now.
Direct NFS: channel id [0] path [192.168.1.252] to filer [ocm] via local [192.168.1.251] is UP
Direct NFS: channel id [1] path [192.168.1.252] to filer [ocm] via local [192.168.1.251] is UP
Once tablespace is created Following SQL will returns the output
select * from v$dnfs_servers;
select * from v$dnfs_files;
To disable DNFS
Change directory to ORACLE_HOME/rdbms/lib and execute make command with dnfs_off
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk dnfs_off
No comments:
Post a Comment