配置Oracle 10g ASM磁碟
總結一下ASM的磁碟建立過程
此次實驗是基於CentOS 4.6系統的實驗,
1.首先,我需要在Oracle的網站上download的一些ASM的lib包
http://www.oracle.com/technology/tech/linux/asmlib/install.html
因為自己實驗的環境是基於Linux的,而且是RHEL AS 4所以會根據當前的kernel和OS的版本下載三個包
分別是:
oracleasm-2.6.9-67.EL-2.0.3-1.i686.rpm
oracleasmlib-2.0.2-1.i386.rpm
oracleasm-support-2.0.3-1.i386.rpm
2.之後可以通過RPM的軟體對他們分別進行安裝
[root@orahost01 ASM]# rpm -Uvh oracleasm-support-2.0.3-1.i386.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@orahost01 ASM]# rpm -Uvh oracleasm-2.6.9-67.EL-2.0.3-1.i686.rpm
Preparing... ########################################### [100%]
1:oracleasm-2.6.9-67.EL ########################################### [100%]
[root@orahost01 ASM]# rpm -Uvn oracleasmlib-2.0.2-1.i386.rpm
-Uvn: unknown option
[root@orahost01 ASM]# rpm -Uvh oracleasmlib-2.0.2-1.i386.rpm
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
並且建立相應的Oracle使用者和組
[root@orahost01 ASM]# groupadd oinstall
[root@orahost01 ASM]# groupadd dba
[root@orahost01 ASM]# mkdir -p /opt/oracle/product
[root@orahost01 ASM]# mkdir -p /home/oracle
[root@orahost01 ASM]# useradd -g oinstall -G dba -d /home/oracle oracle
[root@orahost01 ASM]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@orahost01 ASM]# id oracle
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
[root@orahost01 ASM]# chown -R oracle:oinstall /opt/oracle
[root@orahost01 ASM]# cd /home
[root@orahost01 home]# chown -R oracle:oinstall oracle
3.配置ASM的庫檔案
[root@orahost01 home]# /etc/init.d/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
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
以上操作會載入和ASM相關的一些.o的驅動.並且mount上asm的檔案系統
4.如何disable和enable ASM
[root@orahost01 home]# /etc/init.d/oracleasm disable
Writing Oracle ASM library driver configuration: [ OK ]
Unmounting ASMlib driver filesystem: [ OK ]
Unloading module "oracleasm": [ OK ]
[root@orahost01 home]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
5.建立ASM磁碟
首先先將一些磁碟(4塊)插入我們的Server
之後
[root@orahost01 home]# /etc/init.d/oracleasm createdisk myVol1 /dev/sdb
Marking disk "/dev/sdb" as an ASM disk: asmtool: Device "/dev/sdb" is not a partition
[FAILED]
這裡出現錯誤的原因是由於我們還沒有對/dev/sdb這個裝置檔案所載入的磁碟進行分割槽,而且sdb也不是一個partition
因此我們先對sdb磁碟進行分割槽
[root@orahost01 dev]# fdisk sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130):
Using default value 130
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
這個時候系統中會出現一個sdb1這個裝置檔案
之後我們繼續對sdc,sdd,sde以上面同樣的方法來進行分割槽。
------------------------------------------------------
重新建立ASM磁碟
[root@orahost01 dev]# /etc/init.d/oracleasm createdisk myVol1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
[root@orahost01 dev]# /etc/init.d/oracleasm listdisks
MYVOL1
[root@orahost01 dev]# /etc/init.d/oracleasm createdisk myVol2 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk: [ OK ]
[root@orahost01 dev]# /etc/init.d/oracleasm createdisk myVol3 /dev/sde1
Marking disk "/dev/sde1" as an ASM disk: [ OK ]
[root@orahost01 dev]# /etc/init.d/oracleasm createdisk myVol4 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
[root@orahost01 dev]# /etc/init.d/oracleasm listdisks
MYVOL1
MYVOL2
MYVOL3
MYVOL4
需要注意的是如果是在RAC環境中呢,如果在一個節點新增了ASM磁碟,在其他節點上要用過scandisks命令來獲得這種變化。
如:
[root@orahost01 dev]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
就此ASM環境的物理基礎就已經搭建成功.
其他OS類似於此,很簡單,只要按照這個思路走就可以了:)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12361284/viewspace-65136/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 關於Oracle 10g ASM磁碟大小的限制Oracle 10gASM
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- ORACLE ASM磁碟組空間溢位OracleASM
- Oracle RAC日常運維-ASM磁碟擴容Oracle運維ASM
- Oracle ASM磁碟組擴容(AIX7.1)OracleASMAI
- ORACLE ASM的SSD磁碟空間回收分析OracleASM
- Oracle asm磁碟損壞異常恢復OracleASM
- 【BUILD_ORACLE】使用ASMLib包搭建ASM磁碟UIOracleASM
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- Oracle資料庫 ASM磁碟線上擴容Oracle資料庫ASM
- ASM磁碟組限制ASM
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- RAC之grid叢集安裝及ASM磁碟組配置ASM
- 遷移ASM磁碟組ASM
- 【BUILD_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(二)詳細配置步驟UIOracleASMFilter
- 【ASM】ASM磁碟頭被重寫,如何修復ASM
- 如何檢視Oracle RAC的asm磁碟的udev對應關係OracleASMdev
- 【ASK_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(一)ASMFD簡介OracleASMFilter
- 從定位資料塊所在ASM磁碟到ASM strippingASM
- ASM磁碟組更換磁碟的操作方法ASM
- 【ARCH】Oracle 判斷asm磁碟組大小,超過閾值清理指令碼OracleASM指令碼
- (grid重灌後圖形介面報錯)ASM磁碟組字元介面配置ASM字元
- oracle 10g flashback databaseOracle 10gDatabase
- Oracle ASM神書《撥雲見日 解密Oracle ASM核心》出版了OracleASM解密
- ASM 磁碟組的建立及擴容ASM
- 使用udev擴充套件ASM磁碟組dev套件ASM
- ASM磁碟組擴容操作文件ASM
- Oracle ASM擴容(NFS)OracleASMNFS
- Scheduler in Oracle Database 10g(轉)OracleDatabase
- Oracle 10g 下載地址Oracle 10g
- oracle 10G特性之awrOracle 10g
- ASM磁碟簡單維護,新增,刪除ASM
- ASM磁碟組ORA-15042 ORA-15096ASM
- 一次ASM新增新的磁碟組ASM
- Oracle ASM AMDU工具的使用OracleASM
- Oracle ASM Cluster File Systems (ACOracleASM
- Oracle:ASM & 密碼檔案OracleASM密碼
- ISO 映象安裝oracle 10gOracle 10g