In case of vmware the steps will be as follows :
1) ADD VIRTUAL DISK TO VIRTUAL MACHINE 1
Add hardware
Disk: Select Create a new virtual disk.
Virtual Disk Type: Select SCSI (Recommended). (1:4 in our case)
Disk capacity: Enter “20GB.” ( as per requirement)
Allocate all disk space now
Disk file: locate the shared folder and Enter “asmdisk4.vmdk.”
Mode: Select Independent, Persistent
2) ADD VIRTUAL DISK TO VIRTUAL MACHINE 2
similar way as above but give the patch of same shared disk that we created above, which is asmdisk4.vmdk
3) Modify virtual machine configuration file.
These parameters were already added :
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
scsi1.sharedBus = "virtual"
What new we need to add is
scsi1:4.deviceType = "disk"
NOW the physical disk is added.....
4) Create disk partitions for Oracle ASM
<<<<<<<<<<< AS ROOT USER >>>>>>>>>>>>>>
fdisk /dev/sdf
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()
we are using /dev/sdf as we already have configured /dev/sda sdb sdc sdd sde
If above command W fails for any reason ( resource busy etc) , then reboot the node try fdisk /dev/sdf command again and again try W command.
VERIFY BY >> fdisk -l
5) Map raw devices for ASM disks
Add the following lines in /etc/sysconfig/rawdevices on both nodes of RAC
/dev/raw/raw4 /dev/sdf1
To make the mapping effective immediately, execute the following commands as the root user on both nodes :
# /sbin/service rawdevices restart
VERIFICATION >>>> check on both nodes that you can see new device raw4 on both node's directory /dev/raw
6) Create ASM disks
<<<<<<<<<< As ROOT USER on node 1>>>>>>>>>
/etc/init.d/oracleasm createdisk VOL4 /dev/sdf1 ( VOL 1 2 3 are already existing as can be checked by command /etc/init.d/oracleasm listdisks )
should show below message >>
Marking disk "/dev/sdf1" as an ASM disk: [ OK ]
VERIFICATION >>>
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4
7) Finally add the DISK to ASM diskgroup
Check the current status in v$asm_disk
SQL> select DISK_NUMBER,STATE,NAME,TOTAL_MB,FREE_MB,PATH from v$asm_disk;
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB PATH
----------- -------- ----------------------------------------------------------------------- ---------- --------------------------------------------------------------------------------------------
0 NORMAL 10236 0 /dev/raw/raw4
0 NORMAL RECOVERYDEST_0000 2047 1487 /dev/raw/raw3
1 NORMAL DG1_0001 3067 711 /dev/raw/raw2
1 NORMAL DG1_0000 3067 711 /dev/raw/raw1
SQL> select HEADER_STATUS,MODE_STATUS,NAME from v$asm_disk;
HEADER_STATU MODE_ST NAME
------------ ------- ------------------------------
PROVISIONED ONLINE
MEMBER ONLINE RECOVERYDEST_0000
MEMBER ONLINE DG1_0001
MEMBER ONLINE DG1_0000
SQL> select GROUP_NUMBER,NAME,STATE,TOTAL_MB,FREE_MB from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TOTAL_MB FREE_MB
------------ ------------------------------ ----------- ---------- ----------
1 DG1 MOUNTED 6134 1422
2 RECOVERYDEST MOUNTED 2047 1487
NOW add the disk to the required diskgroup
ALTER DISKGROUP RECOVERYDEST ADD DISK '/dev/raw/raw4' name RECOVERYDEST_0001;
Diskgroup altered.
VERIFICATION >>>>
CHECK DISK STATE
SQL> select DISK_NUMBER,STATE,NAME,TOTAL_MB,FREE_MB from v$asm_disk;
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
----------- -------- ------------------------------ ---------- ----------
0 NORMAL RECOVERYDEST_0000 2047 1489
1 NORMAL DG1_0001 3067 682
0 NORMAL DG1_0000 3067 682
1 NORMAL RECOVERYDEST_0001 10236 10232
CHECK DISKGROUP SIZE
SQL> select GROUP_NUMBER,NAME,STATE,TOTAL_MB,FREE_MB from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TOTAL_MB FREE_MB
------------ ------------------------------ ----------- ---------- ----------
1 DG1 MOUNTED 6134 1364
2 RECOVERYDEST MOUNTED 12283 11721