Create shared disk for Oracle RAC on VMWare(ZT)

http://d-h-n.de/blog/create-shared-disk-for-oracle-rac-on-vmware

For Oracle RAC installation we need share storage for OCR, Voting Disk, ASM..

Shared Disks:

NO SIZE USAGE
1 1 GB Place OCR, Voting Disk and mirror
2 3 GB Place for Database Files. ASM volume 1
3 3 GB Place for Database Files. ASM volume 2
4 3 GB Place for Flash Recovery Area. ASM volume 3
5 3 GB Place for Flash Recovery Area. ASM volume 4
1. Create a directory for shared disks:

Open a CMD. Create a directory for all shared disks:

C:\> mkdir M:\VM4\SharedDisks
Create the shared disk manual with vmware-vdiskmanager.exe
C:\> cd "C:\Program Files\VMware\VMware Workstation"
vmware-vdiskmanager.exe -c -s 1Gb -a lsilogic -t 4 M:\VM4\SharedDisks\ocfs2.vmdk
vmware-vdiskmanager.exe -c -s 3Gb -a lsilogic -t 4 M:\VM4\SharedDisks\asm1.vmdk
vmware-vdiskmanager.exe -c -s 3Gb -a lsilogic -t 4 M:\VM4\SharedDisks\asm2.vmdk
vmware-vdiskmanager.exe -c -s 3Gb -a lsilogic -t 4 M:\VM4\SharedDisks\asm3.vmdk
vmware-vdiskmanager.exe -c -s 3Gb -a lsilogic -t 4 M:\VM4\SharedDisks\asm4.vmdk

where the paraneters are:

Parameter meaning
-c create
-s size
-a adapter type
-t disk type

and disk type is

Disk type meaning
0 single growable virtual disk
1 growable virtual disk split in 2GB files
2 preallocated virtual disk
3 preallocated virtual disk split in 2GB files
4 preallocated ESX-type virtual disk
5 compressed disk optimized for streaming

Note:
- Only with disk type 4 can a RAC installation later successful
- Disk type 4 (preallocated ESX-type virtual disk) is NEW in
VMWare workstation 6.5 Beta and VMWare Server 2.0 Beta.
- Disk type 2 (preallocated virtual disk) dont’work !
- With disk type 2, later when install Clusterware you get the error:
..service OracleCSService in improper PENDING state, err(0)
..service OracleCSService in improper PENDING state, err(997)

2. Add disk to virtual machine

The shared disk are ready created, now we must add them to the all virtual machines functionally as RAC nodes
For example when the first RAC node name RAC1 then open file \RAC1\RAC1.vmx with notepad and add this:

# Begin Virtual VM Disks for Oracle RAC
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"

scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1.sharedBus = "VIRTUAL"

scsi1:0.present = "TRUE"
scsi1:0.fileName = "M:\VM4\SharedDisks\ocfs2.vmdk"
scsi1:0.mode = "independent-persistent"
scsi1:0.deviceType = "disk"

scsi1:1.present = "TRUE"
scsi1:1.fileName = "M:\VM4\SharedDisks\asm1.vmdk"
scsi1:1.mode = "independent-persistent"
scsi1:1.deviceType = "disk"

scsi1:2.present = "TRUE"
scsi1:2.fileName = "M:\VM4\SharedDisks\asm2.vmdk"
scsi1:2.mode = "independent-persistent"
scsi1:2.deviceType = "disk"

scsi1:3.present = "TRUE"
scsi1:3.fileName = "M:\VM4\SharedDisks\asm3.vmdk"
scsi1:3.mode = "independent-persistent"
scsi1:3.deviceType = "disk"

scsi1:4.present = "TRUE"
scsi1:4.fileName = "M:\VM4\SharedDisks\asm4.vmdk"
scsi1:4.mode = "independent-persistent"
scsi1:4.deviceType = "disk"

# End Virtual VM Disks for Oracle RAC

-Power on the machine and check if the OS see all shared disks, for example in Linux

# ls -l /dev/sd*
or
# fdisk -l
原文地址:https://www.cnblogs.com/cqubityj/p/2553599.html