Hi,
1. Shutdown both nodes and create a folder in your hard disk to create Virtual disks
E:\VMSharedStorage is my folder on EHDD
2. Open Command prompt and navigate to C:\Program Files\Oracle\VirtualBox (This is the directory where Virtual Box was installed on my PC)
cd C:\Program Files\Oracle\VirtualBox
3. Execute below commands to create disks
VBoxManage createhd --filename E:\VMSharedStorage\asm1.vdi --size 5120 --format VDI --variant Fixed
VBoxManage createhd --filename E:\VMSharedStorage\asm2.vdi --size 20480 --format VDI --variant Fixed
VBoxManage createhd --filename E:\VMSharedStorage\asm3.vdi --size 20480 --format VDI --variant Fixed
VBoxManage createhd --filename E:\VMSharedStorage\asm4.vdi --size 20480 --format VDI --variant Fixed
4. Execute the below commands to attach these hard disks to node1. Here RACNODE1 is the VM name, not the hostname of node1
VBoxManage storageattach RACNODE01 --storagectl "SATA" --port 1 --device 0 --type hdd --medium E:\VMSharedStorage\asm1.vdi --mtype shareable
VBoxManage storageattach RACNODE01 --storagectl "SATA" --port 2 --device 0 --type hdd --medium E:\VMSharedStorage\asm2.vdi --mtype shareable
VBoxManage storageattach RACNODE01 --storagectl "SATA" --port 3 --device 0 --type hdd --medium E:\VMSharedStorage\asm3.vdi --mtype shareable
VBoxManage storageattach RACNODE01 --storagectl "SATA" --port 4 --device 0 --type hdd --medium E:\VMSharedStorage\asm4.vdi --mtype shareable
5. Execute the below commands to mark the storage as shareable
VBoxManage modifyhd E:\VMSharedStorage\asm1.vdi --type shareable
VBoxManage modifyhd E:\VMSharedStorage\asm2.vdi --type shareable
VBoxManage modifyhd E:\VMSharedStorage\asm3.vdi --type shareable
VBoxManage modifyhd E:\VMSharedStorage\asm4.vdi --type shareable
6. Execute below commands to attach storage to node2, here RACNODE02 is the name of the VM not the hostname of node2
VBoxManage storageattach RACNODE02 --storagectl "SATA" --port 1 --device 0 --type hdd --medium E:\VMSharedStorage\asm1.vdi --mtype shareable
VBoxManage storageattach RACNODE02 --storagectl "SATA" --port 2 --device 0 --type hdd --medium E:\VMSharedStorage\asm2.vdi --mtype shareable
VBoxManage storageattach RACNODE02 --storagectl "SATA" --port 3 --device 0 --type hdd --medium E:\VMSharedStorage\asm3.vdi --mtype shareable
VBoxManage storageattach RACNODE02 --storagectl "SATA" --port 4 --device 0 --type hdd --medium E:\VMSharedStorage\asm4.vdi --mtype shareable
Start both the nodes, now you should be able to detect the storage on both the nodes using fdisk -l command
Now partition the disks on any one node
1. As root user, execute the command fdisk -l, you will notice the disk names that are not partitioned, it says
Disk <diskname> doesn't contain a valid partition table
2. Run the command fdisk <diskname>
When prompted for an option, type n to create new partition
Type p to create primary partition
Type 1 to enter first partition number
Click enter for first cylinder
Click enter for last cylinder
Type w to write and quit.
This creates a new partition that utilizes whole disk size.
Note: ASM is not always stable when using partitions which consume a portion of a disk device. It is recommended that a single partition for the entire disk be used. (Reference : Oracle Database 11g R2: Grid Infrastructure & ASM by Sideris Courseware Corporation - Section 1 - Configuring the Server for Grid Infrastructure Installation - Chapter 5: Managing Linux Devices )
3. Now fdisk -l command should display a valid partitioned table
Thats it !!!
Regards
Charan