真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

OracleRAC之:ASM概念及基本操作維護(hù)

Oracle RAC系列之:ASM基本操作維護(hù)

ASM(自動(dòng)存儲(chǔ)管理)是一個(gè)專門為Oracle數(shù)據(jù)庫(kù)服務(wù)的數(shù)據(jù)文件存儲(chǔ)機(jī)制,通過(guò)ASM管理數(shù)據(jù)文件,DBA不用再擔(dān)心I/O性能問(wèn)題,也不需要知道文件的名稱,同時(shí)ASM也提供了文件系統(tǒng)到卷管理器的集成,下面依次介紹。
一、 ASM的特點(diǎn)
(1)自動(dòng)調(diào)整I/O負(fù)載
ASM可以在所有可用的磁盤中自動(dòng)調(diào)整I/O負(fù)載,不但避免了人工調(diào)整I/O的難度,而且也優(yōu)化了性能,同時(shí),利用ASM可以在線增加數(shù)據(jù)庫(kù)的大小,而無(wú)需關(guān)閉數(shù)據(jù)庫(kù)。

(2)條帶化存儲(chǔ)
ASM將文件分為多個(gè)分配單元(Allocation Units, AU)進(jìn)行存儲(chǔ),并在所有磁盤間平均分配每個(gè)文件的AU。

(3)在線自動(dòng)負(fù)載均衡
當(dāng)共享存儲(chǔ)設(shè)備有變化時(shí),ASM中的數(shù)據(jù)會(huì)自動(dòng)均勻分配到現(xiàn)有存儲(chǔ)設(shè)備中。同時(shí),還可以調(diào)節(jié)數(shù)據(jù)的負(fù)載均衡速度。

(4)自動(dòng)管理數(shù)據(jù)庫(kù)文件
在ASM存儲(chǔ)管理中,Oracle數(shù)據(jù)文件是ASM自動(dòng)管理的。ASM創(chuàng)建的任何文件一旦不再需要,就會(huì)被自動(dòng)刪除。但是,ASM不管理二進(jìn)制文件、跟蹤文件、預(yù)警日志和口令文件。

(5)數(shù)據(jù)冗余
ASM通過(guò)磁盤組鏡像可以實(shí)現(xiàn)數(shù)據(jù)冗余,不需要第三方工具。

(6)支持各種Oracle數(shù)據(jù)文件
ASM存儲(chǔ)支持Oracle數(shù)據(jù)文件、日志文件、控制文件、歸檔日志、RMAN備份集等。

二、ASM的體系結(jié)構(gòu)與后臺(tái)進(jìn)程
圖1顯示了ASM的物理構(gòu)成。
 Oracle RAC之:ASM概念及基本操作維護(hù)dNsXL+0e9ff2I3+1DrX5+5+69fKGouF02xRmXDQBcsCyHwqM448ovgBf1oY1HcSzA2baoj24Mitfq5y6XC6PMtqWzq7u8f6SsOQbFf9/8487de+wXGnDxj8RManZOWXMMis88S3GVSIETULxkH4PiXPVR4BA+lLYHBoeUNcegOMqFbU55/6izq1tZcwyKm8Mj6uv/wDlAcWdxfHLKfg6aAcX5cXu88uuDw2rr/Y9PTpPpTCP03WxuzTq7EFvWNzYbW2lsurS125SmJykf3/lAcU7CkWhpa1fYky8UfX6zcbdkOuP2eAXzC0tujzeZzsTiCXpBO9DOgWBofmGJNooDXnZk8S5xHBlb37OdEhRvChT/BrfHe3xyKtvp9nh9fjMQDIl/xcn7/CaF1dLWLvkqdw/x4uCwms2tkYLZ3Bq9JRyJBoIh5W6+UKRuQGbnC8XWMV5+TWdFnc3nN+k82a9kC6A4JySKYRhujzcWT/j8pjCehBZaW98qflkUt8V7ggym3cKRKG1pVJx8laFjktOGYfj8Jt12Slu7sXgiFk+UtnazubWm3cM5QHE28oUixT9h0vzC0sFhlSK0z2/S66aK02vSi5yTPaNMJhyJ0g8upxxkudhTvgmI/Ft4TKcnjl/a2t0pV8RxKFGxNe1AoDgbsXhifmHJ+upZLJ6wzi6yuTVSUI7lNL6kSJ9MZ1onKnQ3iMUT4UiUXlA8pu5BRxDn0Ph363sDUwKKXwYUb4Lb483m1qj0EQiG8oWikPgyxUVeQfmDSCrCkWgsnqD9qf8k05njk1PRneTbgjgO3Q0CwRBhGIZ4TfUZ66viO+UKBXXqPPKdhP0yXgYU54RyFVKKpr8hs0WslQOksHOnXKFcQk5UKKkgBWPxRCAYou2UWtCRDw6rtqGt2+Nd39g8PjmV6y0tojjdGah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數(shù)據(jù)庫(kù)實(shí)例可以直接訪問(wèn)這些磁盤組;第二部分是ASM文件,每個(gè)ASM文件只能包含在一個(gè)磁盤組中,不過(guò),一個(gè)磁盤組中可以包含屬于多個(gè)數(shù)據(jù)庫(kù)的多個(gè)ASM文件,并且單個(gè)數(shù)據(jù)庫(kù)可以使用來(lái)自多個(gè)磁盤組的存儲(chǔ)空間;第三部分是ASM磁盤,多個(gè)ASM磁盤組成了ASM磁盤組,但每個(gè)ASM磁盤只能屬于一個(gè)磁盤組;第四部分是AU(分配單元),AU是ASM磁盤組分配的最小連續(xù)磁盤空間,ASM磁盤按照AU進(jìn)行分區(qū),每個(gè)AU的大小默認(rèn)為1MB;這個(gè)結(jié)構(gòu)的底層是Oracle數(shù)據(jù)塊,由于AU是ASM分配的最小連續(xù)磁盤空間,因此,ASM是不允許跨分配單元拆分一個(gè)Oracle數(shù)據(jù)塊的。
          要使用ASM,需要在啟動(dòng)數(shù)據(jù)庫(kù)實(shí)例之前,先啟動(dòng)一個(gè)名為“+ASM”的實(shí)例,ASM實(shí)例不會(huì)裝載數(shù)據(jù)庫(kù),啟動(dòng)它的目的是為了管理磁盤組和保護(hù)其中的數(shù)據(jù)。同時(shí),ASM實(shí)例還可以向數(shù)據(jù)庫(kù)實(shí)例傳遞有關(guān)文件布局的信息。通過(guò)這種方式,數(shù)據(jù)庫(kù)實(shí)例就可以直接訪問(wèn)磁盤組中存儲(chǔ)的文件。圖2顯示了ASM的一般體系結(jié)構(gòu)。
 Oracle RAC之:ASM概念及基本操作維護(hù)cDnlpFPbfPo0SO4042JiWFWNXK5/OjRo6wj4TBSM5OQQn0C/+23rPX09BgMhn379qnVaghvTEzM0aNHmQXQ2qWa1zZOVRdpxmZlZT22Ql5enpwBRVH79++3eAz8zfyjq6uLpumamhr475kzZ2pqahQKxYYNG86cOZOYmHjmzBmapru6usrLy/Py8pYtWwbf3bBhg0KhOMOgpqZm//79eXl5cDYOCgoKIFDcL3iRnlKOU8nNYB1w7949uV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OxY8euXbv2u+++EzuO+6G3t/eNN95YunRpb28vSQIyjeRA1XX+/PmkpKQJEyY0NDSIHbL+qampGTduHGsuUxvURWqb0tJSscPUPx0dHdOnT2dN2L127Vppqev8+fPNzc2bN28eMWLExx9//P9JlcuXL9M0bb5sxKVLl2xW1/nz5z/77DOoxL/99luxg2iVLVu2TJo0yXwBBZvVBYkOE6CdO3dO7PBZ5fLly+PGjeNIdNdVFyRBfHz89OnTL1++LHZMW+XcuXMjR47cs2cPKwnI2h82qKu5uflPf/rTxIkTt2zZInb4rPL999+vXLnylVde6erqYoXdNnVBbRMeHi7x2qaoqGjcuHGnTp1ihVqi6rpw4QLMjrVmzZq7d++KHXv/wvfff79jx45Jkybp9XrzNdDa29vtUReEHSrx48ePix1WNkajcfbs2UlJSV9//bV52JcsWWKPui5cuFBRUTF27FgJJvq3336r0WjGjRtncYlCkuiurq4LFy689957o0aN0mg0UqvO7t69u2bNmkmTJl27do1j7UHb1NXc3NzQ0PDGG2/QNP3ZZ5+JHVY2x48fHzduXH5+vsV1F2F5WxvURWqbF1988b333hM7lGygtlm+fLnF2uadd96RqLouXLjQ0tKSnJz861//+o033rhx48ZTsenr69uxY4ePj8/KlStv3Lhx3xKff/65/epqaWk5duzYjBkzJkyYcPToUbHD/fTp06eNjY2RkZFjx46tqKiwGPD79+8vXrzYTnW1tLSQRAeBiR3up319fRqNxsfH5+2337537x53oruBulpaWs6dO7dixYpf//rXGo2mr69P7BR4CtLy8fH54x//aC3vVVVV2akuCHtZWVlgYOD06dNPnz4tdrifPn369MMPP5wwYcLcuXPPnz9vLex2qqulpeXkyZMKhQIEJnaInz59+rS1tbXf2ubtt9+WtLouXrzY1NSUlZX1wgsvgMD+Kgb379+H+mvlypWdnZ191iEzsdqprosXLxqNxqNHj7766quQpUQJ+F//+te6uroZM2YEBgYeOnSII+B9fX2OUhckekpKikQS/e233+7u7uaT6O6hLkgCg8Hw1ltvvfDCC2vWrOnp6RElCXp6ekBamzdv7unp4UiCjz76yC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CcoCeabIutmqBOOhRutCEYMTHYjGYPwOTQ/XC+gOcUC91AOyHKopmp6YtUM2HhVvJZFI85syEdBkSLLYjED7CR7yeQbUcpQuORANcS7pgkQXYGj9DxlaNC0+Ic1q8NeVyOSiTVFIwhBQNZVg86cyEdDWGWCymsSLGGAx9qEtAZYOfN9Y8d8Vvg1pAigbWiCs4oHbBr9NdV7qwdgGRoKZg6PP5NHYCC64Qfbu2IUK6DAisWuL34BQvxIhQQsRUJhQKYaEvFovxGRIOcmV1AT3U+qBuD3UR/ZMnZaQLLFdRlFAoBFamWc3BXzY8/cIjVhgyIV2tS6FQAMuE6SswgFAoBOIHKzWk9eDDPY0mCTupHCFd2wRKKb4+A5f1QtKGz02ua3T8CUHz9IhixroI6dqaiJJCIxHSJWBrvztUsBkI6RIINoqQLoGgwQjpEgg2ipAugaDBCOkSCDaKkC6BoME0SLqePHnyP4Fgi/LkyZMGGFFV/Pvvv82+KwLBJvLPP//8H3BV4xRgXNdJAAAAAElFTkSuQmCC">
 
         從圖2可以看出,ASM實(shí)例與數(shù)據(jù)庫(kù)實(shí)例進(jìn)行通信的橋梁是ASMB進(jìn)程,此進(jìn)程運(yùn)行在每個(gè)數(shù)據(jù)庫(kù)實(shí)例上,是兩個(gè)實(shí)例間信息交換的通道。ASMB進(jìn)程先利用磁盤組名稱通過(guò)CSS獲得管理該磁盤組的ASM實(shí)例連接串,然后建立一個(gè)到ASM的持久連接,這樣兩個(gè)實(shí)例之間就可以通過(guò)這條連接定期交換信息,同時(shí)這也是一種心跳監(jiān)控機(jī)制。
         另外,在ASM實(shí)例中還存在另外一個(gè)新的進(jìn)程,即RBAL,此進(jìn)程負(fù)責(zé)規(guī)劃和協(xié)調(diào)磁盤組的重新平衡活動(dòng)。除此之外,ASM實(shí)例還有一些與數(shù)據(jù)庫(kù)實(shí)例中的進(jìn)程相同的后臺(tái)進(jìn)程,例如LGWR、SMON、PMON、DBWR 、CKPT等。
如果一個(gè)數(shù)據(jù)庫(kù)實(shí)例使用ASM作為存儲(chǔ),那么它將多出兩個(gè)后臺(tái)進(jìn)程,即RBAL和ASMB。RBAL 負(fù)責(zé)打開(kāi)磁盤組中所有磁盤和數(shù)據(jù),而ASMB負(fù)責(zé)和ASM實(shí)例進(jìn)程通信。

三、管理ASM實(shí)例
 在使用ASM作為數(shù)據(jù)存儲(chǔ)時(shí),ASM實(shí)例管理顯得非常重要,Oracle提供了豐富的管理功能,對(duì)ASM實(shí)例進(jìn)行管理需要具備SYSDBA權(quán)限,在Oracle 11g中可以使用一個(gè)新角色 ,即SYSASM,此角色只用于管理ASM實(shí)例。

1.創(chuàng)建ASM實(shí)例
創(chuàng)建ASM實(shí)例有兩種方法,第一種是利用dbca創(chuàng)建,這種方法只需運(yùn)行Database Configuration Assistant(DBCA),然后根據(jù)提示即可創(chuàng)建一個(gè)ASM實(shí)例,此種方式在前面已有講述,這里不再多說(shuō)。第二種方法是用命令行方式創(chuàng)建ASM實(shí)例,下面進(jìn)行簡(jiǎn)單介紹。

(1)創(chuàng)建ASM磁盤
可以使用RAID劃分的LUN、分區(qū)和裸設(shè)備等來(lái)創(chuàng)建ASM磁盤,但是在使用LUN、分區(qū)或裸設(shè)備時(shí),要注意將屬主和屬組改為Oracle用戶及其對(duì)應(yīng)的組,這個(gè)在前面節(jié)已經(jīng)講述過(guò),另外一種簡(jiǎn)單的方法就是使用Oracle提供的ASMLib來(lái)完成ASM磁盤的創(chuàng)建,下面將講述這種方法。

在創(chuàng)建ASM實(shí)例之前,首先應(yīng)該確保節(jié)點(diǎn)上已經(jīng)安裝了ASMlib包,同時(shí)確認(rèn)ASMLib是否已經(jīng)自動(dòng)加載:
[root@node1 ~]# lsmod | grep oracleasm
oracleasm              46356  1

然后,通過(guò)ASMlib提供的oracleasm將已經(jīng)劃分好的磁盤分區(qū)轉(zhuǎn)化為ASM磁盤,例如:
[root@node1 ~]#/etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdc5
Marking disk "/dev/sdc5" as an ASM disk [  OK  ]
[root@node1 ~]#/etc/init.d/oracleasm createdisk ASMDISK2 /dev/sdc6
Marking disk "/dev/sdc6" as an ASM disk [  OK  ]
[root@node1 ~]#/etc/init.d/oracleasm createdisk ASMDISK3 /dev/sdc7
Marking disk "/dev/sdc7" as an ASM disk [  OK  ]
[root@node1 ~]#/etc/init.d/oracleasm createdisk ASMDISK4 /dev/sdc8
Marking disk "/dev/sdc8" as an ASM disk [  OK  ]
[root@node1 ~]#/etc/init.d/oracleasm createdisk ASMdisk5 /dev/sdc9
Marking disk "/dev/sdc9" as an ASM disk [  OK  ]

創(chuàng)建完ASM磁盤后,可以查看系統(tǒng)的/dev/oracleasm/disks/目錄下是否已經(jīng)生成磁盤設(shè)備,可以采用的命令如如下:
[root@node1 ~]# ll /dev/oracleasm/disks/ASMDISK*
brw-rw---- 1 oracle oinstall 8, 21 Sep 10 23:40 /dev/oracleasm/disks/ASMDISK1
brw-rw---- 1 oracle oinstall 8, 22 Sep 10 23:40 /dev/oracleasm/disks/ASMDISK2
brw-rw---- 1 oracle oinstall 8, 23 Sep 10 23:36 /dev/oracleasm/disks/ASMDISK3
brw-rw---- 1 oracle oinstall 8, 24 Sep 10 23:40 /dev/oracleasm/disks/ASMDISK4
brw-rw---- 1 oracle oinstall 8, 25 Sep 10 23:40 /dev/oracleasm/disks/ASMDISK5

也可以通過(guò)如下方式查看:
[root@node1 ~]#service oracleasm listdisks
ASMDISK1
ASMDISK2
ASMDISK3
ASMDISK4
ASMDISK5

如果要?jiǎng)h除 ASM磁盤可通過(guò)以下命令:
[root@node1 ~]#./etc/init.d/oracleasm deletedisk ASMDISK5
Removing ASM disk "ASMdisk5" [  OK  ]

在RAC環(huán)境中,要注意另外一個(gè)節(jié)點(diǎn)是否能夠發(fā)現(xiàn)對(duì)應(yīng)的ASM磁盤,執(zhí)行如下命令,讓另外一個(gè)節(jié)點(diǎn)來(lái)獲取這種變化。
[root@node2 ~]#/etc/init.d/oracleasm scandisks
到此位置,ASM磁盤已經(jīng)創(chuàng)建完畢了。

(2)初始化參數(shù)
啟動(dòng)ASM實(shí)例只需要如下幾個(gè)參數(shù)即可,利用這些參數(shù)可以實(shí)現(xiàn)ASM實(shí)例的內(nèi)存的自動(dòng)分配和自動(dòng)管理。
下面介紹ASM實(shí)例初始化參數(shù):
instance_type=asm
cluster_database=true
DB_UNIQUE_NAME=+ASM
ASM_POWER_LIMIT=1
large_pool_size=60M
asm_diskgroups='FLASH_DISK','ARCH_DISK','DATA_DISK'
asm_diskstring='/dev/oracleasm/disks/*'
每個(gè)參數(shù)的含義如下:
? instance_type,指定實(shí)例的類型,對(duì)于ASM實(shí)例,應(yīng)設(shè)置為ASM
? cluster_database,指定是否是數(shù)據(jù)庫(kù)集群,true表示是ASM集群
? DB_UNIQUE_NAME,指定ASM實(shí)例的名稱,默認(rèn)是+ASM
? ASM_POWER_LIMIT,該參數(shù)用來(lái)控制ASM中數(shù)據(jù)的負(fù)載均衡速度
? large_pool_size,設(shè)置大池的大小,由于ASM文件的分配單元映射是從large_pool分配的,因此large_pool_size至少要8MB,                                   建議越大越好
? asm_diskgroups,指定實(shí)例啟動(dòng)時(shí)可用的ASM磁盤組,ASM實(shí)例將在啟動(dòng)時(shí)自動(dòng)掛載這些磁盤組
? asm_diskstring,用于限制ASM實(shí)例可用于創(chuàng)建磁盤組的磁盤設(shè)備。如果該值為NULL,則ASM實(shí)例可見(jiàn)的所有磁盤都可以成為創(chuàng)建磁盤組的可選磁盤

(3)創(chuàng)建密碼文件
[oracle@node1 ~]$su - oracle
[oracle@node1 ~]$ cd $ORACLE_HOME/dbs
[oracle@node1 ~]$ orapwd file=orapw+ASM password=oracle

(4)創(chuàng)建目錄結(jié)構(gòu)
[oracle@node 1~]$su – oracle
[oracle@node1 ~]$cd $ORACLE_HOME/dbs
[oracle@node1 ~]$mkdir –p $ORALCE_BASE/admin/+ASM/udump
[oracle@node1 ~]$ mkdir –p $ORALCE_BASE/admin/+ASM/bdump
[oracle@node1 ~]$mkdir –p $ORALCE_BASE/admin/+ASM/adump
[oracle@node1~]$ mkdir –p $ORALCE_BASE/admin/+ASM/cdump

2.啟動(dòng)ASM實(shí)例
 無(wú)論在RAC環(huán)境中還是單實(shí)例環(huán)境,ASM實(shí)例都需要用到CSS進(jìn)程,在RAC環(huán)境中,啟動(dòng)CRS后CSS已經(jīng)運(yùn)行,而在單實(shí)例環(huán)境下,需要以root用戶運(yùn)行腳本,初始化CSS服務(wù),否則,在啟動(dòng)ASM實(shí)例時(shí)會(huì)報(bào)如下錯(cuò)誤:
ORA-29701: unable to connect to Cluster Manager
執(zhí)行初始化腳本的過(guò)程如下:
[root@node1 ~]#$ORACLE_HOME/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Cleaning up Network socket directories
Setting up Network socket directories
 Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
 Cluster Synchronization Services is active on these nodes.
        node1
Cluster Synchronization Services is active on all the nodes.
Oracle CSS service is installed and running under init(1M)

然后啟動(dòng)ASM實(shí)例:
[oracle@node1 ~]$export ORACLE_SID=+ASM
[oracle@node1 ~]$sqlplus / as sysdba
SQL> startup
ASM instance started
Total System Global Area    134217728 bytes
Fixed Size                   1218124 bytes
Variable Size               107833780 bytes
ASM Cache                   25165824 bytes
ORA-15110: no diskgroups mounted
因?yàn)槭状螁?dòng)ASM實(shí)例并沒(méi)有創(chuàng)建ASM磁盤組,所以顯示 15110錯(cuò)誤是正常的。
 
3.管理ASM磁盤組
 ASM磁盤組是作為邏輯單元進(jìn)行統(tǒng)一管理的一組磁盤,在ASM實(shí)例中,可以創(chuàng)建和添加新的磁盤組,可以修改現(xiàn)有的磁盤組,在其中添加一個(gè)磁盤或者刪除一個(gè)磁盤,也可以刪除現(xiàn)有的磁盤組。

(1)添加磁盤組
SQL> create diskgroup FLASH_DISK external redundancy disk '/dev/oracleasm/disks/ASMDISK1' name flashdisk;
Diskgroup created.
SQL> create diskgroup ARCH_DISK external redundancy disk '/dev/oracleasm/disks/ASMDISK2' name archdisk1;
Diskgroup created.
SQL> create diskgroup DATA_DISK normal redundancy disk '/dev/oracleasm/disks/ASMDISK4' name datadisk1, '/dev/oracleasm/disks/ASMDISK5' name datadisk2;
Diskgroup created.

(2)查看磁盤組狀態(tài)
SQL> select name,state from v$asm_diskgroup;
NAME                           STATE
-------------------       --------------
FLASH_DISK                   MOUNTED
ARCH_DISK                   MOUNTED
DATA_DISK               MOUNTED

分享題目:OracleRAC之:ASM概念及基本操作維護(hù)
文章地址:http://weahome.cn/article/jdjshe.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部