Using DNFS for test purposes
Posted
by rene.kundersma
on Oracle Blogs
See other posts from Oracle Blogs
or by rene.kundersma
Published on Wed, 24 Mar 2010 22:47:35 -0800
Indexed on
2010/03/25
7:03 UTC
Read the original article
Hit count: 833
First, a quick setup:
1. The standard ODM library needs to be replaced with the NFS ODM library:
[oracle@ocm01 ~]$ cp $ORACLE_HOME/lib/libodm11.so $ORACLE_HOME/lib/libodm11.so_stub [oracle@ocm01 ~]$ ln -s $ORACLE_HOME/lib/libnfsodm11.so $ORACLE_HOME/lib/libodm11.soAfter changing to this library you will notice the following in your alert.log:
Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 2.02. The intention is to mount the datafiles over normal NAS (like NetApp). But, in case you want to test yourself and use an exported NFS filesystem, it should look like the following:
[oracle@ocm01 ~]$ cat /etc/exports /u01/scratch/nfs *(rw,sync,insecure)Please note the "insecure" option in the export, since you will not be able to use DNFS without it if you export a filesystem from a host. Without the "insecure" option the NFS server considers the port used by the database "insecure" and the database is unable to acquire the mount:
Direct NFS: NFS3ERR 1 Not owner. path ocm01.nl.oracle.com mntport 930 nfsport 20493. Before configuring the new Oracle stanza for NFS we still need to configure a regular kernel NFS mount:
[root@ocm01 ~]# cat /etc/fstab | grep nfs ocm01.nl.oracle.com:/u01/scratch/nfs /incoming nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=6004. Then a so called Oracle-'nfstab' needs to be created that specifies what the available exports to use:
[oracle@ocm01 ~]$ cat /etc/oranfstab server:ocm01.nl.oracle.com path:192.168.1.40 export:/u01/scratch/nfs mount:/incoming5. Creating a tablespace with a datafile on the NFS location:
SQL> create tablespace rk datafile '/incoming/rk.dbf' size 10M; Tablespace created.Be sure to know that it may happen that you do not specify the insecure option (like I did). In that case you will still see output from the query v$dnfs_servers:
SQL> select * from v$dnfs_servers; ID SVRNAME DIRNAME MNTPORT NFSPORT WTMAX RTMAX -- -------------------- ----------------- --------- ---------- ------ ------ 1 ocm01.nl.oracle.com /u01/scratch/nfs 684 2049 32768 32768But, querying v$dnfsfiles and v$dnfs_channels will now return any result, and indeed, you will see the following message in the alert-log when you create a file :
Direct NFS: NFS3ERR 1 Not owner. path ocm01.nl.oracle.com mntport 930 nfsport 2049After correcting the export:
SQL> select * from v$dnfs_files; FILENAME FILESIZE PNUM SVR_ID --------------- -------- ------ ------ /incoming/rk.dbf 10493952 20 1Rene Kundersma Oracle Technology Services, The Netherlands
© Oracle Blogs or respective owner