Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

 

Using the Oracle ASM Cluster File System (Oracle ACFS) on Linux

Expert Oracle Tips by Jeff Hunter

March 18, 2011

 
This article, part two of this three part series on ACFS, continues on with the description of how to create an Oracle ASM Cluster File System in an Oracle 11g release 2 RAC database on the Linux operating environment, picking up where we left off in part one where we had finished with the creation of a new Oracle ASM cluster file system and registered in the Oracle ACFS mount registry.  We are now ready to log in to all Oracle RAC nodes as root and run the mount command. 

Mount the ASM Cluster File System

Now that the new Oracle ASM cluster file system has been created and registered in the Oracle ACFS mount registry, log in to all Oracle RAC nodes as root and run the following mount command:

[root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1
/sbin/mount.acfs.bin: error while loading shared libraries: libhasgen11.so:
cannot open shared object file: No such file or directory

[root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1
/sbin/mount.acfs.bin: error while loading shared libraries: libhasgen11.so:
cannot open shared object file: No such file or directory

If you don't have the ORACLE_HOME environment variable set to the Oracle grid infrastructure home as explained in the prerequisites section to this guide, the mount command will fail as shown above. In order to mount the new cluster file system, the Oracle ASM ACFS binaries need access to certain shared libraries in the ORACLE_HOME for grid infrastructure. An easy workaround to get past this error is to set the ORACLE_HOME environment variable for grid infrastructure in the file /sbin/mount.acfs on all Oracle RAC nodes. The ORACLE_HOME should be set at the beginning of the file after the header comments as follows:

#!/bin/sh
#
# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
#

ORACLE_HOME=/u01/app/11.2.0/grid

ORA_CRS_HOME=%ORA_CRS_HOME%
if [ ! -d $ORA_CRS_HOME ]; then
  ORA_CRS_HOME=$ORACLE_HOME
fi
...

You should now be able to successfully mount the volume:

[root@racnode1 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1

[root@racnode2 ~]# /bin/mount -t acfs /dev/asm/docsvol1-300 /documents1

Verify Mounted Cluster File System

To verify that the new cluster file system mounted properly, run the following mount command from all Oracle RAC nodes: 

[root@racnode1 ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sdb1 on /local type ext3 (rw)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
domo:PUBLIC on /domo type nfs (rw,addr=192.168.1.121)
oracleasmfs on /dev/oracleasm type oracleasmfs (rw)
/dev/asm/docsvol1-300 on /documents1 type acfs (rw)

[root@racnode2 ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sdb1 on /local type ext3 (rw)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
domo:Public on /domo type nfs (rw,addr=192.168.1.121)
oracleasmfs on /dev/oracleasm type oracleasmfs (rw)
/dev/asm/docsvol1-300 on /documents1 type acfs (rw)

Set Permissions for ACFS

With the new cluster file system now mounted on all Oracle RAC nodes, change the permissions to allow user access. For the purpose of this example, I want to grant the oracle user account and dba group read/write permissions. Run the following as root from only one node in the Oracle RAC:

[root@racnode1 ~]# chown oracle.dba /documents1
[root@racnode1 ~]# chmod 775 /documents1

Test

Now let's perform a test to see if all of our hard work paid off.

Node 1

Log in to the first Oracle RAC node as the oracle user account and create a test file on the new cluster file system: 

[oracle@racnode1 ~]$ id
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)

[oracle@racnode1 ~]$ echo "The Hunter Family: Jeff, Melody, and Alex" > /documents1/test.txt

[oracle@racnode1 ~]$ ls -l /documents1
total 72
drwxr-xr-x 5 root   root      4096 Nov 23 21:17 .ACFS/
drwx------ 2 root   root     65536 Nov 23 21:17 lost+found/
-rw-r--r-- 1 oracle oinstall    42 Nov 23 21:25 test.txt

Node 2

Log in to the second Oracle RAC node as the oracleuser account and verify the presence and content of the test file:

[oracle@racnode2 ~]$ id
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)

[oracle@racnode2 ~]$ ls -l /documents1
total 72
drwxr-xr-x 5 root   root      4096 Nov 23 21:17 .ACFS/
drwx------ 2 root   root     65536 Nov 23 21:17 lost+found/
-rw-r--r-- 1 oracle oinstall    42 Nov 23 21:25 test.txt

[oracle@racnode2 ~]$ cat /documents1/test.txt
The Hunter Family: Jeff, Melody, and Alex

Oracle Enterprise Manager (OEM)

This section presents a second method that can be used to create an Oracle ASM cluster file system; namely, Oracle Enterprise Manager (OEM). Similar to the ASM Configuration Assistant (ASMCA), OEM provides a convenient graphical user interface for creating and maintaining ASM cluster file systems.

Create Mount Point

From each Oracle RAC node, create a directory that will be used to mount the new Oracle ACFS:

[root@racnode1 ~]# mkdir /documents2

[root@racnode2 ~]# mkdir /documents2

 
 
 
Get the Complete
Oracle Tuning Details 

The landmark book "Oracle Tuning: The Definitive Reference Second Edition" has been updated with over 1,150 pages of expert performance tuning tips. It's packed with scripts and tools to hypercharge Oracle 11g performance and you can buy it for 40% off directly from the publisher.
 


Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

 
   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

 

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA