Sunday, May 17, 2009

Set Up Direct NFS

Set Up Direct NFS
Oracle Direct NFS setup involves manipulating the oranfstab file. The oranfstab file can reside in several locations. Oracle will always check the $ORACLE_HOME/dbs directory first. If the oranfstab file does not exist, it will search in the /etc directory.
If an oranfstab file does not exist, Oracle will use the operating system /etc/mtab file.
Oracle’s Direct NFS client looks for mount point settings in the following order:$ORACLE_HOME/dbs/oranfstab
/etc/oranfstab
/etc/mtab
If there are duplicate entries in these files, Oracle Direct NFS client will use the first entry found.
To implement Oracle Direct NFS, an existing NFS mount point must already exist. The mount options for NFS are irrelevant since Oracle Direct NFS will override and configure settings optimally.
The NFS mount options in the /etc/fstab file for this particular example are as follows: nas103:/apps/oracle/share /oradata nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp, actimeo=0,vers=3,timeo=600
It is important to note that in order to enable Direct NFS, you must disable reserved port settings on the NFS server.
Oracle uses the Oracle Disk Manager (ODM) to control NFS. To enable Direct NFS, you must replace the standard ODM driver with the ODM NFS library. For the client to work, you need to shut down the database and the relevant ASM instance and create a symbolic link from the standard ODM library to point to the NFS ODM library. Before you create the symbolic link, you will rename the original file libodm11.so to libodm11.so.ORIG. Next, you will create the symbolic link libodm11.so to point to libnfsodm11.so.
Here are the steps to set up the NFS ODM library file:
1. cd $ORACLE_HOME/lib
2. mv libodm11.so libodm11.so.ORIG
3. ln -s libnfsodm11.so libodm11.so
Once the setup is complete, you will list the file to confirm that it is pointing to the right file: DBA11g1 > ls -l libodm11.so lrwxrwxrwx 1 oracle oinstall 14 Sep 5 09:02 libodm11.so -> libnfsodm11.so
Start the asm instances on all the cluster nodes and then the databases.
As a verification step query the v$dnfs_servers and it should list some records.col filename for a60
set lines 120
set pages 70
select * from v$dnfs_files;
SQL> select * from v$dnfs_files;
FILENAME FILESIZE PNUM SVR_ID
-------------------------------------------------- ---------- ---------- ----------
/mnt/fresno_11g_std_controlfiles/control01.ctl 8142848 11 1
/mnt/fresno_11g_std_controlfiles/control02.ctl 8142848 11 1
/mnt/fresno_11g_std_controlfiles/control03.ctl 8142848 11 1
/mnt/fresno_11g_std_datafiles/system01.dbf 943726592 9 1
/mnt/fresno_11g_std_datafiles/sysaux01.dbf 943726592 9 1
/mnt/fresno_11g_std_datafiles/undotbs01.dbf 277880832 9 1
/mnt/fresno_11g_std_datafiles/users01.dbf 5251072 9 1
/mnt/fresno_11g_std_datafiles/example01.dbf 104865792 9 1
/mnt/fresno_11g_std_datafiles/newts01.dbf 5251072 9 1
/mnt/fresno_raw_nfs/disk1 102400000 20 11
/mnt/fresno_raw_nfs/disk2 1073741824 20 11
/mnt/fresno_ora11g_asm26g/disk1 5368709120 20 11
/mnt/fresno_ora11g_asm26g/disk2 1.0737E+10 20 11
/mnt/fresno_ora11g_asm26g/disk3 1.0737E+10 20 11
/mnt/fresno_ora11g_asm26g/disk4 2147483648 20 11
/mnt/fresno_11g_std_datafiles/temp01.dbf 20979712 9 1
/mnt/fresno_11g_std_redologs/redo01.log 52429312 10 1
/mnt/fresno_11g_std_redologs/redo02.log 52429312 10 1
/mnt/fresno_11g_std_redologs/redo03.log 52429312 10 1
19 rows selected.
col svrname for a20 col DIRNAME for a50 select * from v$dnfs_servers;
ID SVRNAME DIRNAME MNTPORT NFSPORT WTMAX RTMAX
-------------------- -------------------------------------------------- ---------- ---------- ---------- ----------
1 mosel /vol/fresno_11g_std_controlfiles 4046 2049 65536 65536
3 mosel /vol/fresno_11g_std_datafiles 4046 2049 0 0
10 mosel /vol/fresno_11g_oracle_home 4046 2049 0 0
11 mosel /vol/fresno_raw_nfs 4046 2049 65536 65536
12 mosel /vol/fresno_ora11g_asm26g 4046 2049 0 0
13 mosel /vol/fresno_11g_std_redologs 4046 2049 0 0
6 rows selected.
select * from v$dnfs_channels
PNUM SVRNAME PATH CH_ID SVR_ID SENDS RECVS PINGS
---------- -------------------- ---------------------------------------- ---------- ---------- ---------- ---------- ----------
5 mosel mosel 0 1 0 0 0
9 mosel mosel 0 1 21 42 0
10 mosel mosel 0 1 39 78 0
11 mosel mosel 0 1 66 279 0
12 mosel mosel 0 1 0 0 0
13 mosel mosel 0 1 0 0 0
14 mosel mosel 0 2 13 233 0
18 mosel mosel 0 1 0 0 0
20 mosel mosel 0 11 0 0 0
22 mosel mosel 0 1 13 38 0
23 mosel mosel 0 1 38 112 0
24 mosel mosel 0 1 13 38 0
25 mosel mosel 0 1 13 38 0
26 mosel mosel 0 1 0 0 0
28 mosel mosel 0 1 0 0 0
29 mosel mosel 0 1 0 0 0
30 mosel mosel 0 1 0 0 0
34 mosel mosel 0 1 0 0 0
35 mosel mosel 0 1 0 0 0
36 mosel mosel 0 1 0 0 0

20 rows selected.
select * from v$dnfs_stats;
PNUM NFS_NULL NFS_GETATTR NFS_SETATTR NFS_LOOKUP NFS_ACCESS NFS_READLINK NFS_READ NFS_WRITE NFS_CREATE NFS_MKDIR
---------- ----------- ----------- ---------- ---------- ------------ ---------- ---------- ---------- ----------
NFS_SYMLINK NFS_MKNOD NFS_REMOVE NFS_RMDIR NFS_RENAME NFS_LINK NFS_READDIR NFS_READDIRPLUS NFS_FSSTAT NFS_FSINFO NFS_PATHCONF
---------- ---------- ---------- ---------- ---------- ----------- --------------- ---------- ---------- ------------
NFS_COMMIT NFS_MOUNT
----------
2 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0

3 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0


Next, create the oranfstab file in the $ORACLE_HOME/dbs directory. Since Oracle first looks for the oranfstab file in the $ORACLE_HOME/dbs directory, DBAs can implement Direct NFS without the Unix system administrator’s intervention.
The oranfstab file is not a requirement to implement Direct NFS. The oranfstab file is a special file to list additional options specific for Oracle Database to Direct NFS. The oranfstab file has the following attributes for each NFS server to be accessed using Direct NFS:Server: NFS server name
Path: IP or hostname of up to four network paths to the NFS server
Export: Exported path from the NFS server
Mount: Local mount point for the NFS server
Note For RAC implementations, you must use the oranfstab file from /etc. The oranfstab file must be synchronized across all the RAC servers.
to set up oranfstab for dnfs get the information on the below 1. ethernet ports used in the host 2. Filer that is used to create the volumes
create the file oranfstab in $ORACLE_HOME/dbs as a oracle user. this does not the privilege of a system adminstrator
--Kumarks 18:41, 16 May 2009 (UTC)

1 comment:

  1. Is the usage of libnfsodm11.so exclusive.. meaning that direct attach storage is not usable... or is this a superset and the normal functions and capabilities in libodm11.so and libodmd11.so are still available?

    I use a shared OH and am converting only 1 DB at a time to dNFS.

    Thanks

    ReplyDelete