您好,登錄后才能下訂單哦!
Oracle 11gR2構建RAC之(2)--配置共享存儲
系統環境:
操作系統:RedHat EL5
Cluster: Oracle GI(Grid Infrastructure)
Oracle: Oracle 11.2.0.1.0
如圖所示:RAC 系統架構
Oracle RAC是一個DataBase可以通過多個Instance訪問,每個節點都有一個Instance,所有的Instance對共享的存儲都有讀寫的權限,在共享存儲上可以存放Datafile、controlfile、redolog、spfile、archive log等文件。
RAC的共享存儲一般可以采用OCFS和ASM方式,Oracle推薦首選ASM存儲方式。
二、配置RAC共享存儲(all nodes)
1、首先在linux下要安裝ASM驅動軟件 [root@node1 ~]# uname -a Linux node1 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux [root@node1 asm]# ls -l total 236 -rwxr--r-- 1 500 500 130018 May 9 2012 oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm -rwxr--r-- 1 500 500 13929 Apr 11 2010 oracleasmlib-2.0.4-1.el5.i386.rpm -rwxr--r-- 1 500 500 85382 Apr 11 2010 oracleasm-support-2.1.3-1.el5.i386.rpm 安裝軟件注意要和系統的內核相匹配,并且32位的內核要選擇i386/i686,64位要選擇64位的軟件包 [root@node1 asm]# rpm -ivh * warning: oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:oracleasm-support ########################################### [ 33%] 2:oracleasm-2.6.18-194.el########################################### [ 67%] 3:oracleasmlib ########################################### [100%] 2、建立共享磁盤分區 [root@node1 asm]# fdisk -l Disk /dev/sdb: 22.7 GB, 22769827840 bytes 255 heads, 63 sectors/track, 2768 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 125 1004031 83 Linux /dev/sdb2 126 2768 21229897+ 5 Extended /dev/sdb5 126 250 1004031 83 Linux /dev/sdb6 251 375 1004031 83 Linux /dev/sdb7 376 874 4008186 83 Linux /dev/sdb8 875 1373 4008186 83 Linux /dev/sdb9 1374 1872 4008186 83 Linux /dev/sdb10 1873 2371 4008186 83 Linux /dev/sdb11 2372 2496 1004031 83 Linux /dev/sdb12 2497 2621 1004031 83 Linux /dev/sdb13 2622 2768 1180746 83 Linux ASM DISK 可以通過Linux分區或raw設備建立! 3、建立ASM DISK [root@node1 soft]# service oracleasm configure Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: grid Default group to own the driver interface []: asmadmin Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ] [root@node1 soft]# 建立oracle asm 磁盤: [root@node1 soft]# service oracleasm Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status} [root@node1 soft]# service oracleasm createdisk OCR_VOTE1 /dev/sdb1 Marking disk "OCR_VOTE1" as an ASM disk: [ OK ] [root@node1 soft]# service oracleasm createdisk OCR_VOTE2 /dev/sdb5 Marking disk "OCR_VOTE2" as an ASM disk: [ OK ] [root@node1 soft]# service oracleasm createdisk OCR_VOTE3 /dev/sdb6 Marking disk "OCR_VOTE3" as an ASM disk: [ OK ] 11G RAC將ocr和vote disk存放在ASM diskgroup管理,如果建立normal redundancy需要3塊盤 [root@node1 soft]# service oracleasm createdisk ASM_DATA1 /dev/sdb7 Marking disk "ASM_DATA1" as an ASM disk: [ OK ] [root@node1 soft]# service oracleasm createdisk ASM_DATA2 /dev/sdb8 Marking disk "ASM_DATA2" as an ASM disk: [ OK ] ASM_DATA1,ASM_DATA2 用于建立存儲database的diskgroup [root@node1 soft]# service oracleasm createdisk ASM_RCY1 /dev/sdb9 Marking disk "ASM_RCY1" as an ASM disk: [ OK ] [root@node1 soft]# service oracleasm createdisk ASM_RCY2 /dev/sdb10 Marking disk "ASM_RCY2" as an ASM disk: [ OK ] ASM_RCY1,ASM_RCY2用于創建存儲recovery area的diskgroup [root@node1 soft]# service oracleasm listdisks ASM_DATA1 ASM_DATA2 ASM_RCY1 ASM_RCY2 OCR_VOTE1 OCR_VOTE2 OCR_VOTE3 在其他節點: [root@node2 asm]# service oracleasm scandisks Scanning the system for Oracle ASMLib disks: [ OK ] [root@node2 asm]# service oracleasm listdisks ASM_DATA1 ASM_DATA2 ASM_RCY1 ASM_RCY2 OCR_VOTE1 OCR_VOTE2 OCR_VOTE3
@至此,在RAC下的共享存儲配置完成!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。