Create Oracle ASM Cluster File Systems (ACFS) in Oracle Database 11g Release 2

来源:互联网 发布:mac配置多个环境变量 编辑:程序博客网 时间:2024/06/07 05:42

OS版本是Oracle Linux5.8 x86_64,Oracle Database和Grid Infrastructure版本是11.2.0.3,双节点RAC。

[root@vzwc1 ~]# cat /etc/issueOracle Linux Server release 5.8Kernel \r on an \m[root@vzwc1 ~]# uname -p      x86_64[root@vzwc1 ~]# [root@vzwc1 ~]# [root@vzwc1 ~]# su - grid     [grid@vzwc1 ~]$ crsctl query crs activeversionOracle Clusterware active version on the cluster is [11.2.0.3.0][grid@vzwc1 ~]$ [grid@vzwc1 ~]$ su - oraclePassword: [oracle@vzwc1 ~]$ sqlplus -VSQL*Plus: Release 11.2.0.3.0 Production

必须打上最新版本的PSU补丁,使用最新版的opatch软件(patch NO 6880880)打上11.2.0.3.5的PSU补丁(patch NO14727347)。

[root@vzwc1 ~]# opatch versionOPatch Version: 11.2.0.3.3OPatch succeeded.
[root@vzwc1 ~]# lsmod |grep oracleoracleacfs           1616046  0 oracleadvm            220230  0 oracleoks             283115  2 oracleacfs,oracleadvm[root@vzwc1 ~]# [root@vzwc1 ~]# /u01/app/11.2.0/grid/bin/acfsdriverstate -orahome /u01/app/11.2.0/grid versionACFS-9325:     Driver OS kernel version = 2.6.32-300.0.4.el5uek(x86_64).ACFS-9326:     Driver Oracle version = 121021.[root@vzwc1 ~]# [root@vzwc1 ~]# [root@vzwc1 ~]# /u01/app/11.2.0/grid/bin/acfsdriverstate -orahome $ORACLE_HOME supportedACFS-9200: Supported


grid用户PSU

[grid@vzwc2 ~]$ opatch lspatches15876003;Grid Infrastructure Patch Set Update : 11.2.0.3.5 (14727347)14727310;Database Patch Set Update : 11.2.0.3.5 (14727310)[grid@vzwc2 ~]$ [grid@vzwc2 ~]$ [grid@vzwc2 ~]$ opatch lsinvOracle Interim Patch Installer version 11.2.0.3.3Copyright (c) 2012, Oracle Corporation.  All rights reserved.Oracle Home       : /u01/app/11.2.0/gridCentral Inventory : /u01/app/oraInventory   from           : /u01/app/11.2.0/grid/oraInst.locOPatch version    : 11.2.0.3.3OUI version       : 11.2.0.3.0Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-04-17_16-29-54PM_1.logLsinventory Output file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2013-04-17_16-29-54PM.txt--------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Grid Infrastructure                                           11.2.0.3.0There are 1 products installed in this Oracle Home.Interim patches (2) :Patch  15876003     : applied on Wed Apr 17 15:15:09 CST 2013Unique Patch ID:  15680307Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.5 (14727347)"   Created on 11 Jan 2013, 06:19:07 hrs PST8PDT   Bugs fixed:     15876003, 14275572, 13919095, 13696251, 13348650, 12659561, 13039908     14277586, 13987807, 14625969, 13938166, 13825231, 13036424, 12794268     13011520, 13569812, 12758736, 13000491, 13498267, 13077654, 13001901     13550689, 13430715, 13806545, 13634583, 11675721, 14082976, 14271305     12771830, 12538907, 13947200, 12996428, 14102704, 13066371, 13483672     12594616, 13879428, 13540563, 12897651, 12897902, 13241779, 12896850     12726222, 12829429, 12728585, 13079948, 12876314, 13090686, 12925041     12995950, 13251796, 12650672, 12398492, 12848480, 13582411, 13652088     12990582, 13857364, 12975811, 12917897, 13653178, 13082238, 12947871     13037709, 13371153, 12878750, 10114953, 11772838, 13058611, 13001955     14001941, 11836951, 12965049, 13440962, 12765467, 13727853, 13425727     12885323, 14407395, 13965075, 13339443, 12784559, 14242977, 13332363     13074261, 12971251, 13811209, 12709476, 14168708, 14096821, 13993634     13460353, 13523527, 12857064, 13719731, 13396284, 12899169, 13111013     12558569, 13323698, 12867511, 12639013, 10260842, 12959140, 13085732     12829917, 10317921, 13843080, 12934171, 12849377, 12349553, 13924431     13869978, 12680491, 12914824, 13789135, 12730342, 13334158, 12950823     10418841, 12832204, 13355963, 13531373, 13776758, 12720728, 13620816     13002015, 13023609, 13024624, 12791719, 13886023, 13255295, 13821454     12782756, 14152875, 14100232, 14186070, 14569263, 13912373, 12873909     13845120, 14214257, 12914722, 13243172, 12842804, 13045518, 12765868     12772345, 12663376, 13345868, 14059576, 13683090, 12932852, 13889047     12695029, 14588629, 13146560, 13038806, 14251904, 14070200, 13820621     14304758, 13396356, 13697828, 13258062, 12834777, 14371335, 12996572     13941934, 14711358, 13657366, 13019958, 12810890, 13888719, 14637577     13502441, 13726162, 13880925, 14153867, 13506114, 12820045, 13604057     12823838, 13877508, 12823042, 14494305, 13582706, 13617861, 12825835     13263435, 13025879, 13853089, 14009845, 13410987, 13570879, 13637590     12827493, 13247273, 13068077Patch  14727310     : applied on Wed Apr 17 15:08:44 CST 2013Unique Patch ID:  15663328Patch description:  "Database Patch Set Update : 11.2.0.3.5 (14727310)"   Created on 27 Dec 2012, 00:06:30 hrs PST8PDTSub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"   Bugs fixed:     13566938, 13593999, 10350832, 14138130, 12919564, 13624984, 13588248     13080778, 13804294, 14258925, 12873183, 13645875, 12880299, 14664355     14409183, 12998795, 14469008, 13719081, 13492735, 12857027, 14263036     14263073, 13742433, 13732226, 12905058, 13742434, 12849688, 12950644     13742435, 13464002, 12879027, 13534412, 14613900, 12585543, 12535346     12588744, 11877623, 12847466, 13649031, 13981051, 12582664, 12797765     14262913, 12923168, 13612575, 13384182, 13466801, 13484963, 11063191     13772618, 13070939, 12797420, 13041324, 12976376, 11708510, 13742437     13026410, 13737746, 13742438, 13326736, 13001379, 13099577, 14275605     13742436, 9873405, 9858539, 14040433, 12662040, 9703627, 12617123     12845115, 12764337, 13354082, 13397104, 12964067, 13550185, 12780983     12583611, 14546575, 13476583, 15862016, 11840910, 13903046, 15862017     13572659, 13718279, 13657605, 13448206, 13419660, 14480676, 13632717     14063281, 13430938, 13467683, 13420224, 14548763, 12646784, 14035825     12861463, 12834027, 15862021, 13377816, 13036331, 14727310, 13685544     13499128, 15862018, 12829021, 15862019, 12794305, 14546673, 12791981     13503598, 13787482, 10133521, 12718090, 13399435, 14023636, 12401111     13257247, 13362079, 12917230, 13923374, 14480675, 13524899, 13559697     14480674, 13916709, 14076523, 13773133, 13340388, 13366202, 13528551     12894807, 13343438, 13454210, 12748240, 14205448, 13385346, 15853081     12971775, 13035804, 13544396, 13035360, 14062795, 12693626, 13332439     14038787, 14062796, 12913474, 14841409, 14390252, 13370330, 14062797     13059165, 14062794, 12959852, 13358781, 12345082, 12960925, 9659614     13699124, 14546638, 13936424, 13338048, 12938841, 12658411, 12620823     12656535, 14062793, 12678920, 13038684, 14062792, 13807411, 12594032     13250244, 15862022, 9761357, 12612118, 13742464, 14052474, 13457582     13527323, 15862020, 12780098, 13502183, 13705338, 13696216, 10263668     15862023, 13554409, 15862024, 13103913, 13645917, 14063280, 13011409Rac system comprising of multiple nodes  Local node = vzwc2  Remote node = vzwc1--------------------------------------------------------------------------------OPatch succeeded.

oracle用户PSU

[oracle@vzwc2 ~]$ opatch lspatches14727310;Database Patch Set Update : 11.2.0.3.5 (14727310)15876003;Grid Infrastructure Patch Set Update : 11.2.0.3.5 (14727347)[oracle@vzwc2 ~]$ [oracle@vzwc2 ~]$ [oracle@vzwc2 ~]$ opatch lsinvOracle Interim Patch Installer version 11.2.0.3.3Copyright (c) 2012, Oracle Corporation.  All rights reserved.Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1Central Inventory : /u01/app/oraInventory   from           : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.locOPatch version    : 11.2.0.3.3OUI version       : 11.2.0.3.0Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2013-04-17_16-31-06PM_1.logLsinventory Output file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2013-04-17_16-31-06PM.txt--------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Database 11g                                                  11.2.0.3.0There are 1 products installed in this Oracle Home.Interim patches (2) :Patch  14727310     : applied on Wed Apr 17 15:24:24 CST 2013Unique Patch ID:  15663328Patch description:  "Database Patch Set Update : 11.2.0.3.5 (14727310)"   Created on 27 Dec 2012, 00:06:30 hrs PST8PDTSub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"   Bugs fixed:     13566938, 13593999, 10350832, 14138130, 12919564, 13624984, 13588248     13080778, 13804294, 14258925, 12873183, 13645875, 12880299, 14664355     14409183, 12998795, 14469008, 13719081, 13492735, 12857027, 14263036     14263073, 13742433, 13732226, 12905058, 13742434, 12849688, 12950644     13742435, 13464002, 12879027, 13534412, 14613900, 12585543, 12535346     12588744, 11877623, 12847466, 13649031, 13981051, 12582664, 12797765     14262913, 12923168, 13612575, 13384182, 13466801, 13484963, 11063191     13772618, 13070939, 12797420, 13041324, 12976376, 11708510, 13742437     13026410, 13737746, 13742438, 13326736, 13001379, 13099577, 14275605     13742436, 9873405, 9858539, 14040433, 12662040, 9703627, 12617123     12845115, 12764337, 13354082, 13397104, 12964067, 13550185, 12780983     12583611, 14546575, 13476583, 15862016, 11840910, 13903046, 15862017     13572659, 13718279, 13657605, 13448206, 13419660, 14480676, 13632717     14063281, 13430938, 13467683, 13420224, 14548763, 12646784, 14035825     12861463, 12834027, 15862021, 13377816, 13036331, 14727310, 13685544     13499128, 15862018, 12829021, 15862019, 12794305, 14546673, 12791981     13503598, 13787482, 10133521, 12718090, 13399435, 14023636, 12401111     13257247, 13362079, 12917230, 13923374, 14480675, 13524899, 13559697     14480674, 13916709, 14076523, 13773133, 13340388, 13366202, 13528551     12894807, 13343438, 13454210, 12748240, 14205448, 13385346, 15853081     12971775, 13035804, 13544396, 13035360, 14062795, 12693626, 13332439     14038787, 14062796, 12913474, 14841409, 14390252, 13370330, 14062797     13059165, 14062794, 12959852, 13358781, 12345082, 12960925, 9659614     13699124, 14546638, 13936424, 13338048, 12938841, 12658411, 12620823     12656535, 14062793, 12678920, 13038684, 14062792, 13807411, 12594032     13250244, 15862022, 9761357, 12612118, 13742464, 14052474, 13457582     13527323, 15862020, 12780098, 13502183, 13705338, 13696216, 10263668     15862023, 13554409, 15862024, 13103913, 13645917, 14063280, 13011409Patch  15876003     : applied on Wed Apr 17 15:19:36 CST 2013Unique Patch ID:  15680307Patch description:  "Grid Infrastructure Patch Set Update : 11.2.0.3.5 (14727347)"   Created on 11 Jan 2013, 06:19:07 hrs PST8PDT   Bugs fixed:     15876003, 14275572, 13919095, 13696251, 13348650, 12659561, 13039908     14277586, 13987807, 14625969, 13938166, 13825231, 13036424, 12794268     13011520, 13569812, 12758736, 13000491, 13498267, 13077654, 13001901     13550689, 13430715, 13806545, 13634583, 11675721, 14082976, 14271305     12771830, 12538907, 13947200, 12996428, 14102704, 13066371, 13483672     12594616, 13879428, 13540563, 12897651, 12897902, 13241779, 12896850     12726222, 12829429, 12728585, 13079948, 12876314, 13090686, 12925041     12995950, 13251796, 12650672, 12398492, 12848480, 13582411, 13652088     12990582, 13857364, 12975811, 12917897, 13653178, 13082238, 12947871     13037709, 13371153, 12878750, 10114953, 11772838, 13058611, 13001955     14001941, 11836951, 12965049, 13440962, 12765467, 13727853, 13425727     12885323, 14407395, 13965075, 13339443, 12784559, 14242977, 13332363     13074261, 12971251, 13811209, 12709476, 14168708, 14096821, 13993634     13460353, 13523527, 12857064, 13719731, 13396284, 12899169, 13111013     12558569, 13323698, 12867511, 12639013, 10260842, 12959140, 13085732     12829917, 10317921, 13843080, 12934171, 12849377, 12349553, 13924431     13869978, 12680491, 12914824, 13789135, 12730342, 13334158, 12950823     10418841, 12832204, 13355963, 13531373, 13776758, 12720728, 13620816     13002015, 13023609, 13024624, 12791719Rac system comprising of multiple nodes  Local node = vzwc2  Remote node = vzwc1--------------------------------------------------------------------------------OPatch succeeded.



Manual ACFS/ADVM installation.

you will be able to create ASM volumes

[grid@vzwc1 ~]$ sqlplus / as sysasmSQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 17 16:23:06 2013Copyright (c) 1982, 2011, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Real Application Clusters and Automatic Storage Management optionsSQL> alter diskgroup dsgdg add volume ebernal size 6G;Diskgroup altered.

Then create the ACFS filesystem

[grid@vzwc1 ~]$ /sbin/mkfs -t acfs -b 4k /dev/asm/ebernal-401 mkfs.acfs: version                   = 11.2.0.3.0mkfs.acfs: on-disk version           = 39.0mkfs.acfs: volume                    = /dev/asm/ebernal-401mkfs.acfs: volume size               = 6442450944mkfs.acfs: Format complete.

 Register the ASM Volume (ADVM) & ACFS filesystem in the Oracle Registry

[grid@vzwc1 ~]$ /sbin/acfsutil registry -f -a /dev/asm/ebernal-401 /dsgacfsacfsutil registry: mount point /dsgacfs successfully added to Oracle Registry


 As root user, please mount the ACFS filesystem on the ASM Volume (ADVM)

[root@vzwc1 ~]# mkdir /dsgacfs[root@vzwc1 ~]# mount -t acfs /dev/asm/ebernal-401 /dsgacfs

Verify the ACFS filesystem is mounted

[root@vzwc1 ~]# df -THFilesystem    Type     Size   Used  Avail Use% Mounted on/dev/mapper/VolGroup00-LogVol00              ext3      38G    21G    16G  58% //dev/sda1     ext3     104M    25M    75M  25% /boottmpfs        tmpfs     1.1G   733M   318M  70% /dev/shm/dev/asm/ebernal-401              acfs     6.5G    51M   6.4G   1% /dsgacfs





ASM Configuration Assistant (ASMCA)


























Test

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

[root@vzwc1 dsgacfs]# chown -R oracle:oinstall /dsgacfs                  [root@vzwc1 dsgacfs]# chmod 755 /dsgacfs          

RAC1

Log in to thefirst Oracle RAC node as the oracle user account and create a test file on thenew cluster file system

[oracle@vzwc1 ~]$ echo "ACFS Test" > /dsgacfs/test.txt[oracle@vzwc1 ~]$ ls -l /dsgacfs/total 68drwx------ 2 oracle oinstall 65536 Apr 17 16:34 lost+found/-rw-r--r-- 1 oracle oinstall    10 Apr 17 17:13 test.txt[oracle@vzwc1 ~]$ cat /dsgacfs/test.txt ACFS Test


RAC2

Log in to thesecond Oracle RAC node as the oracle user account and verify the presenceand content of the test file

[oracle@vzwc2 ~]$ df -THFilesystem    Type     Size   Used  Avail Use% Mounted on/dev/mapper/VolGroup00-LogVol00              ext3      38G    17G    19G  47% //dev/sda1     ext3     104M    25M    75M  25% /boottmpfs        tmpfs     1.1G   712M   339M  68% /dev/shm/dev/asm/ebernal-401              acfs     6.5G   210M   6.3G   4% /dsgacfs[oracle@vzwc2 ~]$ [oracle@vzwc2 ~]$ [oracle@vzwc2 ~]$ ll /dsgacfs/total 68drwx------ 2 oracle oinstall 65536 Apr 17 17:16 lost+found/-rw-r--r-- 1 oracle oinstall    10 Apr 17 17:18 test.txt[oracle@vzwc2 ~]$ [oracle@vzwc2 ~]$ cat /dsgacfs/test.txt ACFS Test



Reference documentation

How To Install/Reinstall Or Deinstall ACFS Modules/Installation Manually? [ID 1371067.1]



原创粉丝点击