1.对磁盘进行分区
[root@dbserver1 ~]# fdisk –l
[root@dbserver1 ~]# fdisk /dev/sdd
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-512, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-512, default 512):
Using default value 512
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@dbserver1 ~]# fdisk /dev/sdc
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-512, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-512, default 512):
Using default value 512
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
按同样的方法做sde,sdf,sdg
查看分区情况。
[root@dbserver1 asmlib]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 112423+ 83 Linux
/dev/sda2 15 408 3164805 82 Linux swap
/dev/sda3 409 2610 17687565 8e Linux LVM
Disk /dev/sdb: 536 MB, 536870912 bytes
64 heads, 32 sectors/track, 512 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 536 MB, 536870912 bytes
64 heads, 32 sectors/track, 512 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 391 3140676 83 Linux
Disk /dev/sde: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sde1 1 391 3140676 83 Linux
Disk /dev/sdf: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 391 3140676 83 Linux
Disk /dev/sdg: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdg1 1 391 3140676 83 Linux
2.安装ASMlib
A 下载相应的软件
http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel4-092650.html
一直到最后,先找到Inter IA32(x86) Architecture
将上面两个软件下载后,再回到RAC1查看机器内核
[root@rac1 raw]# uname -rm
2.6.9-89.ELsmp i686
找到下面一栏
下载ELsmp的一个软件
B 分别在两个节点上安装这三个软件
[root@dbserver1 asmlib]# ls
oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpm oracleasmlib-2.0.4-1.el4.i386.rpm oracleasm-support-2.1.7-1.el4.i386.rpm
[root@dbserver1 asmlib]# rpm -ivh oracleasm-support-2.1.7-1.el4.i386.rpm
warning: oracleasm-support-2.1.7-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@dbserver1 asmlib]# rpm -ivh oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpm
warning: oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasm-2.6.9-89.ELsm########################################### [100%]
[root@dbserver1 asmlib]# rpm -ivh oracleasmlib-2.0.4-1.el4.i386.rpm
warning: oracleasmlib-2.0.4-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@dbserver1 asmlib]#
C 配置驱动包
[root@dbserver1 ~]# /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 <ENTER> without typing an
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
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
D 检查是否加载
[root@dbserver1 ~]# df -ha
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
17G 16G 0 100% /
none 0 0 0 - /proc
none 0 0 0 - /sys
none 0 0 0 - /dev/pts
/dev/sda1 107M 14M 88M 13% /boot
none 1014M 0 1014M 0% /dev/shm
none 0 0 0 - /proc/sys/fs/binfmt_misc
sunrpc 0 0 0 - /var/lib/nfs/rpc_pipefs
/dev/hdc 2.3G 2.3G 0 100% /media/cdrom
oracleasmfs 0 0 0 - /dev/oracleasm
[root@dbserver1 ~]#
[root@dbserver1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@dbserver1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sde1
Marking disk "VOL2" as an ASM disk: [ OK ]
[root@dbserver1 ~]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdf1
Marking disk "VOL3" as an ASM disk: [ OK ]
[root@dbserver1 ~]# /etc/init.d/oracleasm createdisk VOL4 /dev/sdg1
Marking disk "VOL4" as an ASM disk: [ OK ]
[root@dbserver1 ~]# cd /dev/oracleasm/disks/
[root@dbserver1 disks]# ll
total 0
brw-rw---- 1 oracle dba 8, 49 Apr 30 06:37 VOL1
brw-rw---- 1 oracle dba 8, 65 Apr 30 06:37 VOL2
brw-rw---- 1 oracle dba 8, 81 Apr 30 06:37 VOL3
brw-rw---- 1 oracle dba 8, 97 Apr 30 06:38 VOL4
[root@dbserver1 disks]#
3.创建ASM实例
利用DBCA创建就可以了。