Using the Oracle ASM Cluster File System (Oracle ACFS) on Linux,Part Two
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 inpart onewhere 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.
@H_403_6@Mount the ASM Cluster File SystemNow 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-tacfs/dev/asm/docsvol1-300/documents1/sbin/mount.acfs.bin:errorwhileloadingsharedlibraries:libhasgen11.so: cannotopensharedobjectfile:Nosuchfileordirectory[root@racnode2~]#/bin/mount-tacfs/dev/asm/docsvol1-300/documents1/sbin/mount.acfs.bin:errorwhileloadingsharedlibraries:libhasgen11.so: cannotopensharedobjectfile:Nosuchfileordirectory
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,Oracleand/oritsaffiliates.Allrightsreserved. #ORACLE_HOME=/u01/app/11.2.0/gridORA_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-tacfs/dev/asm/docsvol1-300/documents1[root@racnode2~]#/bin/mount-tacfs/dev/asm/docsvol1-300/documents1@H_403_6@Verify Mounted Cluster File System
Toverifythatthenewclusterfilesystemmountedproperly,runthefollowingmountcommandfromallOracleRACnodes: [root@racnode1~]#mount/dev/mapper/VolGroup00-LogVol00on/typeext3(rw) procon/proctypeproc(rw) sysfson/systypesysfs(rw) devptson/dev/ptstypedevpts(rw,gid=5,mode=620) /dev/sdb1on/localtypeext3(rw) /dev/sda1on/boottypeext3(rw) tmpfson/dev/shmtypetmpfs(rw) noneon/proc/sys/fs/binfmt_misctypebinfmt_misc(rw) sunrpcon/var/lib/nfs/rpc_pipefstyperpc_pipefs(rw) domo:PUBLICon/domotypenfs(rw,addr=192.168.1.121) oracleasmfson/dev/oracleasmtypeoracleasmfs(rw)/dev/asm/docsvol1-300on/documents1typeacfs(rw)[root@racnode2~]#mount/dev/mapper/VolGroup00-LogVol00on/typeext3(rw) procon/proctypeproc(rw) sysfson/systypesysfs(rw) devptson/dev/ptstypedevpts(rw,mode=620) /dev/sdb1on/localtypeext3(rw) /dev/sda1on/boottypeext3(rw) tmpfson/dev/shmtypetmpfs(rw) noneon/proc/sys/fs/binfmt_misctypebinfmt_misc(rw) sunrpcon/var/lib/nfs/rpc_pipefstyperpc_pipefs(rw) domo:Publicon/domotypenfs(rw,addr=192.168.1.121) oracleasmfson/dev/oracleasmtypeoracleasmfs(rw)/dev/asm/docsvol1-300on/documents1typeacfs(rw)@H_403_6@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~]#chownoracle.dba/documents1[root@racnode1~]#chmod775/documents1
Test
Now let's perform a test to see if all of our hard work paid off.
Node 1
LogintothefirstOracleRACnodeastheoracleuseraccountandcreateatestfileonthenewclusterfilesystem: [oracle@racnode1~]$iduid=1101(oracle)gid=1000(oinstall)groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper) [oracle@racnode1~]$echo"TheHunterFamily:Jeff,Melody,andAlex">/documents1/test.txt[oracle@racnode1~]$ls-l/documents1total72 drwxr-xr-x5rootroot4096Nov2321:17.ACFS/ drwx------2rootroot65536Nov2321:17lost+found/ -rw-r--r--1oracleoinstall42Nov2321:25test.txt
Node 2
Log in to the second Oracle RAC node as theoracleuser account and verify the presence and content of the test file:
[oracle@racnode2~]$iduid=1101(oracle)gid=1000(oinstall)groups=1000(oinstall),1301(oper) [oracle@racnode2~]$ls-l/documents1total72 drwxr-xr-x5rootroot4096Nov2321:17.ACFS/ drwx------2rootroot65536Nov2321:17lost+found/ -rw-r--r--1oracleoinstall42Nov2321:25test.txt [oracle@racnode2~]$cat/documents1/test.txtTheHunterFamily:Jeff,andAlex
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
转自:http://www.rampant-books.com/t_hunter_using_oracle_acfs_on_linux_part2.htm
原文链接:https://www.f2er.com/oracle/212050.html