References
How To Create ASM Diskgroups using NFS/NAS Files? (Doc ID 731775.1)
Step by Step - Configure Direct NFS Client (DNFS) on Linux (Doc ID 762374.1)
Enabling Direct NFS Client Oracle Disk Manager Control of NFS
Overview
The ASM storage is configured on the
FREENAS
NFS server using the Oracle DirectNFS driver.
Corrections have been made based on information in 13 Create Database Successful .
Even more corrections have been made based on information in 14 Set Up DirectNFS for Example Database .
Procedure
Create NFS Volume and Share
Using the FreeNAS Web Gui at
http://freenas.yaocm.id.au
, I created a ZFS dataset called
ASMDATA
which is 7GB in size, and is owned by
asm:asmdba
.
I also created a NFS Share for
/mnt/PENRITH/ASMDATA
for access only by the
192.168.2.0/24
network and having a Maproot User of
root
.
Enabling Direct NFS Client Oracle Disk Manager Control of NFS
Following the procedure in
Enabling Direct NFS Client Oracle Disk Manager Control of NFS
, first on
PENRITH1
:
su - mkdir /u07 chown asm:asmdba /u07 cat >>/etc/fstab <<DONE freenas-nas:/mnt/PENRITH/ASMDATA /u07 nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,noac,actimeo=0,vers=3,timeo=600 DONE mount /u07 su - asm cd /u01/app/asm/product/11.1.0/db_1/dbs cat >oranfstab <<DONE server: freenas path: 192.168.2.1 local: 192.168.2.2 export: /mnt/PENRITH/ASMDATA mount: /u07 DONE
This is repeated on
PENRITH2
. Here, I am mounting the NFS share for ASM files on
/u07
and setting up the DirectNFS driver configuration.
The driver is enabled as follows, on
PENRITH2
,:
[asm@penrith2 dbs]$ cd ../lib [asm@penrith2 lib]$ cp libodm11.so libodm11.so_stub [asm@penrith2 lib]$ ln -s libnfsodm11.so libodm11.so ln: creating symbolic link `libodm11.so' to `libnfsodm11.so': File exists [asm@penrith2 lib]$ ls -l libodm11.so lrwxrwxrwx 1 asm oinstall 12 Jan 2 08:18 libodm11.so -> libodmd11.so
This was repeated on
PENRITH1
.
Create the NFS Disk Drives
Followed the procedure in How To Create ASM Diskgroups using NFS/NAS Files? (Doc ID 731775.1) , to create two (2) NFS disk drives:
-
recovery.dbf
of size 4GB -
data.dbf
of size 3GB
[asm@penrith1 u07]$ dd if=/dev/zero of=/u07/recovery.dbf bs=8192 count=520000 520000+0 records in 520000+0 records out 4259840000 bytes (4.3 GB) copied, 2078.18 seconds, 2.0 MB/s [asm@penrith1 u07]$ dd if=/dev/zero of=/u07/data.dbf bs=8192 count=400000 dd: writing `/u07/data.dbf': Disk quota exceeded 397393+0 records in 397392+0 records out 3255435264 bytes (3.3 GB) copied, 1646.34 seconds, 2.0 MB/s [asm@penrith1 u07]$ ls -lh total 7.1G -rw-r--r-- 1 asm asmdba 3.1G Jan 4 23:31 data.dbf -rw-r--r-- 1 asm asmdba 4.0G Jan 4 21:47 recovery.dbf [asm@penrith1 u07]$ df -h . Filesystem Size Used Avail Use% Mounted on freenas-nas:/mnt/PENRITH/ASMDATA 7.1G 7.1G 0 100% /u07
Change Permissions
The permissions on the ASM files are changed as follows:
[root@penrith1 ~]# chmod 775 /u07 [root@penrith1 ~]# chown -R asm:oinstall /u07 [root@penrith1 ~]# chmod 664 /u07/*.dbf
Change Startup Parameters
The following is added to the pfile,
$ORACLE_HOME/dbs/init+ASM1.ora
,:
FILESYSTEMIO_OPTIONS = directIO