VMware Cloud Community
Thaidog
Contributor
Contributor

Raw disks possible with ESXi?

I would like to dedicate a 1.8T lun which is 4 disks out of 6 that are connected to an internal SAS lun on a Dell PowerEdge 2950 server. The other first two disks have been mirrored and are where ESXi and the REHL 5 vm reside.

I would like to do a raw partition because it will be holding a very big MySQL database and will need good speed.

How do you make a raw partition on ESXi? The lun I want to make has not been allocated to a data store yet either... only the mirrored boot disk has one so far.

Reply
0 Kudos
8 Replies
nick_couchman
Immortal
Immortal

On the VM where you'd like to add the disk(s), go to Edit Settings -> Add -> Hard Disk. On the Device Type select Raw Device Mappings -> Next, then select the raw device you'd like to map. Repeat for as many HDs as you like. I'm assuming you're going to be putting those 4 drives into some sort of RAID array on the Dell side, then map the entire thing to a VM?

Reply
0 Kudos
Thaidog
Contributor
Contributor

Yes that is the plan but I want to actually make things a little more complicated than that. I am going to make two redhat VMs on the mirrore drive and I'd like to use the raw drive as a clustered drive GFS for both the vms.

Dp you think this is possible?

Reply
0 Kudos
nick_couchman
Immortal
Immortal

Yep - add the drive as a new SCSI controller device - when you select the SCSI device to use on the VM, select SCSI 1:0 - and then switch the configuration for that SCSI controller to enable device sharing, either Virtual (if the VMs will run on the same host) or Physical (if the VMs will run on different ESXi hosts).

Reply
0 Kudos
Thaidog
Contributor
Contributor

Oh wow thanks! That is really cool! Is there anything like "fencing" that needs to be setup for consistancy sake?

Reply
0 Kudos
Thaidog
Contributor
Contributor

Also, will it be the same scsi id for both vms? Like: SCSI 1:0 ike you said?

Reply
0 Kudos
nick_couchman
Immortal
Immortal

It can be, but it doesn't have to be. You can set it to one SCSI ID on one host and one on the other - unless the software you're using to access the disk is particular about it, you don't need to be.

Reply
0 Kudos
nick_couchman
Immortal
Immortal

I think you said you're using GFS on RH? Fencing is definitely a good idea - IIRC, some of the Linux-based HA software has fencing for VMware, so that may be what you need to do. If you're not able to come up with some fencing mechanism for insuring that the hosts don't try to write to the FS when they can't communicate then you need to set up multiple communications mechanisms between the VMs, preferably of different types. You can use a couple of network cards, or you can set up a file-based serial port or the like. You should have at least two communications paths, though, so that if one gets blocked you don't corrupt your FS.

Reply
0 Kudos
Thaidog
Contributor
Contributor

Ok the fencing method sounds a little more straight forward and I read something about it being available for the vmware perl_api. Thanks for your help!

Reply
0 Kudos