VMware Cloud Community
hxman101
Contributor
Contributor

Sharing RAW Volumes With Multiple VMs

Is it possible to map a RAW piece of storage to multiple VMs, for example we have some VMs that will be in a cluster and they need shared storage between them? I am unable to find the docs online.

Thanks

Tags (1)
Reply
0 Kudos
14 Replies
a_p_
Leadership
Leadership

You can find the MSCS cluster documentation for the different vSphere versions at http://kb.vmware.com/kb/1004617

Remember, that MSCS is a shared-nothing cluster, i.e. only one node at a time can access a shared volume.

André

Reply
0 Kudos
hxman101
Contributor
Contributor

So it appears I can't share RAW Device Mappings correct? On the second host when I try to select a disk it only shows shared Datastores and not the RDM....

Reply
0 Kudos
MKguy
Virtuoso
Virtuoso

When adding the RDM to the 2nd VM you have to select "Add an existing virtual disk" and point it to the RDM mapping vmdk file that was created on the datastore when you added the RDM to the first VM (by default this mapping file is created in the first VMs folder).

Please refer to the documentation linked by André above and this KB article:  VMware KB: Microsoft Clustering on VMware vSphere: Guidelines for supported configurations

-- http://alpacapowered.wordpress.com
Reply
0 Kudos
hxman101
Contributor
Contributor

So if the Datastore is clustered?

When I create the RDM on the 1st VM, then "Onto which datastore do you want to map this LUN?" I select "Store with Virtual Machine" or "specify datastore"?

Reply
0 Kudos
MKguy
Virtuoso
Virtuoso

It doesn't really matter, this is just about the location of the RDM mapping file. The mapping file basically just says "access for this virtual disk is directed to physical LUN X".

It might be a bit easier to manage or understand if you create a dedicated folder on a datastore and store the mapping file there instead of leaving it in the default VM folder of your first VM, but in the end it doesn't really matter as long as you know where to point your other VMs.

-- http://alpacapowered.wordpress.com
Reply
0 Kudos
UmeshAhuja
Commander
Commander

Procedure

For Primary VM

1 On the Select a Disk page of the New Virtual Machine wizard, select Raw Device Mapping and click Next.

2 From the list of SAN disks or LUNs, select a LUN for your virtual machine to access directly and click Next.

3 Select a datastore for the LUN mapping file and click Next.

You can place the RDM file on the same datastore where your virtual machine configuration file resides, or select a different datastore.

Note : To use vMotion for virtual machines with enabled NPIV, make sure that the RDM files of the virtual machines are located on the same datastore. You cannot perform Storage vMotion or vMotion between datastores when NPIV is enabled.

4 Select a compatibility mode and click Next.

           Physical : Allows the guest operating system to access the hardware directly. Physical compatibility is useful if you are using SAN-aware applications on the virtual machine. However, a virtual machine with a physical compatibility RDM cannot be cloned, made into a template, or migrated if the migration involves copying the disk.

          Virtual : Allows the RDM to behave as if it were a virtual disk, so you can use such features as taking a snapshot, cloning, and so on. When you clone the disk or make a template from it, the contents of the LUN are copied into a .vmdk virtual disk file. When you migrate a virtual compatibility mode RDM, you can migrate the mapping file or copy the contents of the LUN into a virtual disk.

5 Accept the default or select a different virtual device node. In most cases, you can accept the default device node. For a hard disk, a nondefault device node is useful to control the boot order or to have different SCSI controller types.

For example, you might want to boot from an LSI Logic controller and share a data disk with another virtual machine using a bus Logic controller with bus sharing turned on.

6 (Optional) To change the way disks are affected by snapshots, click Independent and select an option.

          Independent - Persistent : Disks in persistent mode behave like conventional disks on your physical computer. All data written to a disk in persistent mode are written permanently to the disk.

          Independent - Nonpersistent : Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine. With nonpersistent mode, you can restart the virtual machine with a virtual disk in the same state every time. Changes to the disk are written to and read from a redo log file that is deleted when you power off or reset.

7 Click Next.

For Secondary VM

1 Edit Virtual machine settings

2 Add HDD

3 Use an existing virtual disk

4 Browse the datastore of Virtual machine you have added the RDM

5 Select the .vmdk

6 Click finish

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
Reply
0 Kudos
gautamparkash
Contributor
Contributor

i have same problem, but after following the same step for mapping RDM disk.

we mapped the RDM while VM's is in power on state. getting the below error while we followed steps for secondary VM.

File system specific implementation of LookupAndOpen[file] failed

we mapped the RDM in power of state, then we are able to power on one VM only, getting below error while powering on second VM

Cannot open the disk '/vmfs/volumes/5e1d47cc-5505508c-f8cd-000af775e1f0/TEST1/TEST1_1.vmdk' or one of the snapshot disks it depends on.

Failed to lock the file

File system specific implementation of LookupAndOpen[file] failed

Please help.

Reply
0 Kudos
continuum
Immortal
Immortal

Consider yourself lucky that the advice from umesh did not work - it is not supposed to work like that.

If it worked it was a cool way to sabotage the filesystems inside your VMs !!!


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
jburen
Expert
Expert

Please make sure that the SCSI Controller that is used for the RDM is set to SCSI Bus Sharing: Physical. This should also be in the documentation...

Consider giving Kudos if you think my response helped you in any way.
Reply
0 Kudos
gautamparkash
Contributor
Contributor

So how i will fix this problem.

I tried with all option in sharing:

No Sharing

Unspecified

Multi Wrinter

with Physical/Virtual option

But not working, help me to get it fixed

Reply
0 Kudos
continuum
Immortal
Immortal

You do not use vmdks in multiwriter mode to share data between normal VMs.

This is for special cluster aware VMs only


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
gautamparkash
Contributor
Contributor

Hi all,

Still having the same issue. i tried the all option but no luck exiting cluster is working find but unable to configure the new cluster. Please help.

File system specific implementation of LookupAndOpen[file] failed

File system specific implementation of LookupAndOpen[file] failed

File system specific implementation of LookupAndOpen[file] failed

File system specific implementation of Ioctl[file] faile

Reply
0 Kudos
jburen
Expert
Expert

If you follow the instructions in the referenced documentation it should work. I do however have a question about your remark "excisting cluster is working..." I assume you are using new RDMs and are not trying to use the same RDMs that are used for the existing cluster... That will never work...

Consider giving Kudos if you think my response helped you in any way.
Reply
0 Kudos
gautamparkash
Contributor
Contributor

Yes correct, i am using the new RDM, i am not using this existing cluster.

Reply
0 Kudos