VMware Cloud Community
06blade
Enthusiast
Enthusiast

RAW device mapping

Please could someone advise where I'm going wrong - I thought this was a simple process !!!!

I have a 500GB LUN currently presented to a phyiscal server running windows 2003. This partition is formatted as NTFS.

I now want to add this volume to an exisitng Virtual machjne as an RDM. In the SAN management software I have unpresented this LUN to the physical server and switched this server off. I have presented this LUN to our group of ESX servers. A rescan of the storage adapters shows the LUN is now presented.

If I attempt to add storage I can see the LUN - continuing will format the volume, I do not want this to happen. So I'm confident the LUN is visible to the ESX environment.

If I select a VM, and attempt to add a hard drive, the option to add an RDM is greyed out. I have rescanned a few times, powered off the VM, rebooted the ESX host, rebooted virtual centre but it's greyed out all the time.

Have I forgotten something?

0 Kudos
6 Replies
weinstein5
Immortal
Immortal

There are two components to an RDM - the raw LUN and a special VMDK that needs to be stored on a VMFS volume - do you have any VMFS datastore available?

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
AndreTheGiant
Immortal
Immortal

If I attempt to add storage I can see the LUN - continuing will format the volume, I do not want this to happen.

In this way you create a new VMFS datastore (and is not what you want to do)

If I select a VM, and attempt to add a hard drive, the option to add an RDM is greyed out.

This is the rigth way.

Is very strange that the option is grayed out.

If you can see the LUN in ESX, you can try to use vmkfstools to create the RDM disk.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
06blade
Enthusiast
Enthusiast

I have 2 VMFS volumes available.

The virtual machine I'm using has "Hard Drive 1" from a VMFS partition. I'm trying to add "Hard Drive 2" as the RDM !!!

0 Kudos
vidkun
Contributor
Contributor

Have you looked into vmkfstools? Such as:

vmkfstools -z /vmfs/devices/disks/vml.blahblahblah rawlun.vmdk

0 Kudos
06blade
Enthusiast
Enthusiast

I'll need to get my head around the format of the command. Big problem I've got is I cannot get much opportunity to test this. We have no LUNs free on the SAN to test with, so I have to test on the production lun. I can only get 15 mins downtime just once a week.

what's the difference between using -r and -z in the command line?

another thing that puzzling me, and this will need to be sorted before I can attempt the RDM additoon from the command line. The LUN I wish to add as an RDM is presented to the ESX server. If I run the command ls -l /vmfs/devices/disks I'm not seeing it there. But it's there in the GUI after I've done a Storage Adapters re-scan.

I assume it will need to be visible from the command line....

0 Kudos
06blade
Enthusiast
Enthusiast

ok, I've got the disk to list, it's the biggest disk - the one which is 999141933056 in size

my VMFS partition is called esx-lun1 and the vm is simply called FS1. FS1 is a windows 2003 server which currently has 1 hard disk which is VMFS on esx-lun1

what would the command be to add this 999141933056 partition as an RDM to FS1, which would be hard disk 2.

drwxr-xr-x 1 root root 512 Aug 13 14:10 .

drwxr-xr-x 1 root root 512 Aug 13 14:10 ..

-rw------- 1 root root 73295462400 Aug 13 14:10 mpx.vmhba0:C0:T0:L0

-rw------- 1 root root 1151506944 Aug 13 14:10 mpx.vmhba0:C0:T0:L0:1

-rw------- 1 root root 115153920 Aug 13 14:10 mpx.vmhba0:C0:T0:L0:2

-rw------- 1 root root 72020551680 Aug 13 14:10 mpx.vmhba0:C0:T0:L0:3

-rw------- 1 root root 72020519424 Aug 13 14:10 mpx.vmhba0:C0:T0:L0:5

-rw------- 1 root root 598925639680 Aug 13 14:10 naa.600a0b80005a808d0000010b497f7a7e

-rw------- 1 root root 598923697664 Aug 13 14:10 naa.600a0b80005a808d0000010b497f7a7e:1

-rw------- 1 root root 20971520 Aug 13 14:10 naa.600a0b80005a808d0000016a4980db5c

-rw------- 1 root root 598925639680 Aug 13 14:10 naa.600a0b80005a808e00000104497f7a25

-rw------- 1 root root 598923697664 Aug 13 14:10 naa.600a0b80005a808e00000104497f7a25:1

-rw------- 1 root root 999141933056 Aug 13 14:10 naa.600a0b80005a808e000001774985f962

-rw------- 1 root root 999132954624 Aug 13 14:10 naa.600a0b80005a808e000001774985f962:1

lrwxrwxrwx 1 root root 19 Aug 13 14:10 vml.0000000000766d686261303a303a30 -> mpx.vmhba0:C0:T0:L0

lrwxrwxrwx 1 root root 21 Aug 13 14:10 vml.0000000000766d686261303a303a30:1 -> mpx.vmhba0:C0:T0:L0:1

lrwxrwxrwx 1 root root 21 Aug 13 14:10 vml.0000000000766d686261303a303a30:2 -> mpx.vmhba0:C0:T0:L0:2

lrwxrwxrwx 1 root root 21 Aug 13 14:10 vml.0000000000766d686261303a303a30:3 -> mpx.vmhba0:C0:T0:L0:3

lrwxrwxrwx 1 root root 21 Aug 13 14:10 vml.0000000000766d686261303a303a30:5 -> mpx.vmhba0:C0:T0:L0:5

lrwxrwxrwx 1 root root 36 Aug 13 14:10 vml.0200010000600a0b80005a808e00000104497f7a25313732362d32 -> naa.600a0b80005a808e00000104497f7a25

lrwxrwxrwx 1 root root 38 Aug 13 14:10 vml.0200010000600a0b80005a808e00000104497f7a25313732362d32:1 -> naa.600a0b80005a808e00000104497f7a25:1

lrwxrwxrwx 1 root root 36 Aug 13 14:10 vml.0200020000600a0b80005a808d0000010b497f7a7e313732362d32 -> naa.600a0b80005a808d0000010b497f7a7e

lrwxrwxrwx 1 root root 38 Aug 13 14:10 vml.0200020000600a0b80005a808d0000010b497f7a7e313732362d32:1 -> naa.600a0b80005a808d0000010b497f7a7e:1

lrwxrwxrwx 1 root root 36 Aug 13 14:10 vml.0200060000600a0b80005a808e000001774985f962313732362d32 -> naa.600a0b80005a808e000001774985f962

lrwxrwxrwx 1 root root 38 Aug 13 14:10 vml.0200060000600a0b80005a808e000001774985f962313732362d32:1 -> naa.600a0b80005a808e000001774985f962:1

lrwxrwxrwx 1 root root 36 Aug 13 14:10 vml.02001f0000600a0b80005a808d0000016a4980db5c556e69766572 -> naa.600a0b80005a808d0000016a4980db5c

0 Kudos