当主节点安装oracleasm disk
[root@rac1 dev]# /etc/init.d/oracleasm deletedisk /dev/sdc1 VOL01
Removing ASM disk "/dev/sdc1": [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL101 /dev/sdc1
Marking disk "VOL101" as an ASM disk: [ OK ]
[root@rac1 dev]#/etc/init.d/oracleasm createdisk VOL102 /dev/sdc2
Marking disk "VOL102" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL103 /dev/sdd1
Marking disk "VOL103" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL104 /dev/sdd2
Marking disk "VOL104" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL201 /dev/sde1
Marking disk "VOL201" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL202 /dev/sde2
Marking disk "VOL202" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL203 /dev/sdf1
Marking disk "VOL203" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm createdisk VOL204 /dev/sdf2
Marking disk "VOL204" as an ASM disk: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac1 dev]# /etc/init.d/oracleasm listdisks
VOL101
VOL102
VOL103
VOL104
VOL201
VOL202
VOL203
VOL204
在第二节点上查看的时候发现有一部分卷组没有识别,fdisk -l 是可以识别到的!
[root@rac2 dev]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac2 dev]# /etc/init.d/oracleasm listdisks
VOL101
VOL102
VOL103
VOL104---缺少 VOL201 VOL202 两块卷组!
VOL203
VOL204
[root@rac2 dev]#
[root@rac2 dev]#
[root@rac2 dev]#
[root@rac2 dev]# fdisk -l
Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 547 4192965 82 Linux swap / Solaris
/dev/sda3 548 3263 21816270 83 Linux
Disk /dev/sdb: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1632 13109008+ 83 Linux
/dev/sdb2 1633 3263 13101007+ 83 Linux
Disk /dev/sdc: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 1632 13109008+ 83 Linux
/dev/sdc2 1633 3263 13101007+ 83 Linux
Disk /dev/sdd: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 1633 13117041 83 Linux
/dev/sdd2 1634 3263 13092975 83 Linux
Disk /dev/sde: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sde1 1 1633 13117041 83 Linux
/dev/sde2 1634 3263 13092975 83 Linux
Disk /dev/sdf: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 1633 13117041 83 Linux
/dev/sdf2 1634 3263 13092975 83 Linux
[root@rac2 dev]#
Last login: Thu Sep 1 13:48:14 2011 from 10.1.165.7
由于是vmware ESX 安装共享存储,查看配置文件:
[root@rac shared_storage]# ll
total 110100800
-rw------- 1 root root 5368709120 Aug 30 18:48 share1-flat.vmdk
-rw------- 1 root root 444 Aug 30 19:49 share1.vmdk
-rw------- 1 root root 26843545600 Aug 30 19:17 share2-flat.vmdk
-rw------- 1 root root 445 Aug 30 20:33 share2.vmdk
-rw------- 1 root root 26843545600 Aug 30 19:27 share3-flat.vmdk
-rw------- 1 root root 445 Aug 30 20:33 share3.vmdk
-rw------- 1 root root 26843545600 Aug 30 19:34 share4-flat.vmdk
-rw------- 1 root root 445 Aug 30 19:49 share4.vmdk
-rw------- 1 root root 26843545600 Aug 30 19:39 share5-flat.vmdk
-rw------- 1 root root 445 Aug 30 20:33 share5.vmdk
[root@rac shared_storage]#
发现第二个节点的vmx配置文件
scsi1:3.present = "TRUE"
scsi1:3.fileName = "/vmfs/volumes/4adc51a2-4dbc89c1-55f4-00221957b3b8/shared_storage/share5.vmdk"
scsi1:3.mode = "independent-persistent"
scsi1:3.deviceType = "scsi-hardDisk"
scsi1:4.present = "TRUE"
scsi1:4.fileName = "/vmfs/volumes/4adc51a2-4dbc89c1-55f4-00221957b3b8/shared_storage/share5.vmdk"
scsi1:4.mode = "independent-persistent"
scsi1:4.deviceType = "scsi-hardDisk"
修改scsi1:3.fileName 的为share4.vmdk
scsi1:3.present = "TRUE"
scsi1:3.fileName = "/vmfs/volumes/4adc51a2-4dbc89c1-55f4-00221957b3b8/shared_storage/share4.vmdk"
scsi1:3.mode = "independent-persistent"
scsi1:3.deviceType = "scsi-hardDisk"
注意:上述修改第二节点的配置文件的操作必须在第二节点主机关闭的情况下执行,重启之后,再次检查!!
[root@rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac2 ~]# /etc/init.d/oracleasm listdisks
VOL101
VOL102
VOL103
VOL104
VOL201
VOL202
VOL203
VOL204
[root@rac2 ~]#
成功。。