Connecting a volume for use as a Raw Device Mapping
The process of presenting a volume to a cluster of ESXi hosts to be used as a Raw Device Mapping is no different than presenting a volume that will be used as a datastore. The most important step for presenting a volume that will be used as an RDM is ensuring that the LUN ID is consistent across all hosts in the cluster. The easiest way to accomplish this task is by connecting the volume to a host group on the FlashArray instead of individually to each host. This process is outlined in the Host and Host Group Creation section of the VMware Platform Guide.
If the volume is not presented with the same LUN ID to all hosts in the ESXi cluster then VMware may incorrectly report that a volume is not in use when it is. VMware Knowledge Article Storage LUNs that are already in use as an RDM appear available in the Add Storage Window further explains this behavior.
Identifying the underlying volume for a Raw Device Mapping
There are times where you will need to determine which volume on the FlashArray is associated with a Raw Device Mapping.
1. Right click on the virtual machine and select "Edit Settings".
2. Locate the desired RDM you wish to inspect and expand the properties of the disk.
3. Under the disk properties locate the "Physical LUN" section and note the vml identifier.
4. Once you have the vml identifier we can then find the LUN ID and the volume identifier to match it to a FlashArray volume.
vml.0200fa0000624a93708a75393becad4e430004e270466c61736841
The above string can be analyzed as follows:
- fa - hex value of the LUN ID (250 in decimal)
- 624a9370 - Everpure identifier
-
8a75393becad4e430004e270 - volume serial number on the FlashArray
5. Now that we know the identifier and LUN ID we can look at the FlashArray to determine which volume is backing the RDM
As seen above we are able to confirm that this particular RDM is backed by the volume called "space-reclamation-test" on the FlashArray.
Removing a Raw Device Mapping from a virtual machine
The process for removing a Raw Device Mapping from a virtual machine is a little different than that of removing a virtual machine disk (VMDK).
1. Right click the virtual machine and select "Edit Settings".
2. Locate the desired RDM you wish to remove and click the "x".
3. Ensure the box "Delete files from datastore" is checked.
4. Click "OK".
5. If you are no longer require the volume then you can safely disconnect the volume from the FlashArray and rescan the ESXi hosts.
By selecting "Delete files from datastore" this is not deleting the data on the volume. This step simply removes the mapping file created on the datastore that points to the underlying volume (raw device).
Resizing a Raw Device Mapping
Depending on which compatibility mode you have chosen for your RDM the resize process will vary. Following the process outlined in Expanding the size of a Raw Device Mapping (RDM) provides an example for both physical and virtual RDMs.