Pages

Thursday, June 27, 2013

Shared RDM LUN between non-clustered vmware virtual machines

Requirement:

Have 2 VMs based on OS Oracle Enterprise Linux that will host oracle 10g database. The requirement is to share multiple LUNs between these two nodes (VMs).

I implemented 'sharing RDM Luns' by following the below procedure.

1. Create the required LUNs on SAN and present it to the ESX hosting the VM1.
2. ESX --> configuration --> Storage Adapters --> Scan for newly presented LUNs.
3. VM1 -->
       Edit Settings -->
         Add Hard Disk -->
            Raw Device Mappings -->
              Select and configure a LUNx -->
                Select a Datastore (Store with the VM1, for ease access later) -->
                  Select Compatibility Made (Physical or Virtual, Anything is fine) -->
                    (Imp) Advanced Options --> Virtual Device Node should be different controller than what is used by the base OS Disk (usually OS disk uses 0:0). So, select 1:0 from the drop down

                     Finish --> You will see a new SCSI Controller added on the Edit Settings window just above the new Mapped RDM LUN.

(Imp) Select the new SCSI Controller, on the right pane you will see SCSI Bus Sharing, Change it to Virtual (if the VMs sharing the RDMs will be on same host). Choose Physical (if the VMs are/will be hosted on different hosts).
Click OK on the Edit Settings screen.

To add the same LUN to VM2:
VM2 -->
       Edit Settings -->
         Add Hard Disk -->
            Existing Disk -->
              Browse the Datastore (or the VM folder within) and select the RDM (vmdk file) which was added to VM1.
                    (Imp) Advanced Options --> Virtual Device Node should be different controller than what is used by the base OS Disk (usually OS disk uses 0:0). So, select 1:0 from the drop down

                     Finish --> You will see a new SCSI Controller added on the Edit Settings window just above the new Mapped RDM LUN.

(Imp) Select the new SCSI Controller, on the right pane you will see SCSI Bus Sharing, Change it to Virtual (if the VMs sharing the RDMs will be on same host). Choose Physical (if the VMs are/will be hosted on different hosts).
Click OK on the Edit Settings screen.

Login to VM1 --> Make the disks online and create required partition.
Login to VM2 --> The same shared disks need to be detected and brought online.

Now you can use these shared disks between the 2 VMs.

In case if you want to share multiple RDM LUNs, then choose the Virtual Device Node as 1:1 1:2 1:3 so on.

Thanks for reading the post!

1 comment:

Anthony said...

Im so glad to read this post, thank you so much for sharing.

We are trying to deploy Global file system between 04 Linux VM's, but we were trying to use virtual wwn's on each vm. Unfourtunately, storage admins couldn't see that WWNs, and i didnt know how to make this RDM work for my 04 VM's.

Thanks again.