Hopefully you all enjoyed the last scenario based post because you are about to get another one 🙂 Kind of a different take on covering the remaining skills from the storage section, section 1. So, here we go!
Scenario 1
A coworker has come to you complaining that every time he performs storage related functions from within the vSphere client, VMware kicks off these long running rescan operations. He's downright sick of seeing them and wants them to stop, saying he will rescan when he feels the need to, rather than having vSphere decide when to do it. Make it happen!
So, quite the guy your coworker, thinking he's smarter than the inner workings of vSphere but luckily we have a way we can help him. And also the functions we are going to perform are also part of the VCAP blueprint as well – coincidence? Either way, the answer to our coworkers prayers is something called vCenter Server storage filters and there are 4 of them, explained below…
RDM Filter (config.vpxd.filter.rdmFilter) – filters out LUNs that are already mapped as an RDM
VMFS Filter (config.vpxd.filter.vmfsFilter) – filters out LUNs that are already used as a VMFS datastore
Same Hosts and Transports Filter (config.vpxd.filter.sameHostsAndTransporstFilter) – Filters out LUNS that cannot be used as a datastore extent
Host Rescan Filter (config.vpxd.filter.hostRescanFilter) – Automatically rescans storage adapters after storage-related management functions are performed.
As you might of concluded it's the Host Rescan Filter that we will need to setup. Also, you may have concluded that these are advanced vCenter Server settings, judging by the config.vpxd prefixes. What is conclusive is that all of these settings are enabled by default – so if we need to disable one, such as the Host Rescan Filter, we will need to set the corresponding key to false. Another funny thing is that we won't see these setup by default. Basically they are silently enabled. Anyways, let's get on to solving our coworkers issue.
Head into the advanced settings of vCenter Server (Home-vCenter Server Settings->Advanced Options). From here, disabling the host rescan filter is as easy as adding the config.vpxd.filter.hostRescanFilter and false values to the text boxes near the bottom of the screen and clicking 'Add' – see below
And voila! That coworker of yours should no longer have to put up with those pesky storage rescans after he's done performing his storage related functions.
Scenario 2
You work for the mayors office in the largest city in Canada. The mayor himself has told you that he installed some SSD into a host last night and it is showing as mpx.vmhba1:C0:T0:L0 – but not being picked up as SSD! You mention that you think that is simply SAS disks but he persists it isn't (what is this guy on crack :)). Either way, you are asked if there is anything you can do to somehow 'trick' vSphere into thinking that this is in fact an SSD.
Ok, so this one isn't that bad really, a whole lot of words for one task. Although most SSD devices will be tagged as SSD by default there are times when they aren't. Obviously this datastore isn't an SSD device, but the thing is we can tag it as SSD if we want to. To start, we need to find the identifier of the device we wish to tag. This time I'm going to run esxcfg-scsidevs to do so (with -c to show a compact display).
1 |
esxcfg-scsidevs -c |
From there I'll grab the UUID of the device I wish to tag, in my case mpx.vmhba1:C0:T0:L0 – (crazy Rob Ford). Now if I have a look at that device with the esxcli command I can see that it is most certainly not ssd.
1 |
esxcli storage core device list -d mpx.vmhba1:C0:T0:L0 |
So, our first step is to find out which SATP is claiming this device. The following command will let us do just that
1 |
esxcli storage nmp device list -d mpx.vmhba1:C0:T0:L0 |
Alright, so now that we know the SATP we can go ahead and define a SATP rule that states this is SSD
1 |
esxcli storage nmp satp rule add -s VMW_SATP_LOCAL -d mpx.vmhba1:C0:T0:L0 -o enable_ssd |
And from here we need to reclaim the device
1 |
esxcli storage core claiming reclaim -d mpx.vmhba1:C0:T0:L0 |
And, another look at our listing out of the device should now show us that we are dealing with a device that is SSD.
1 |
esxcli storage core device list -d mpx.vmhba1:C0:T0:L0 |
So there you go Mr. Ford, I mean Mr. Mayor – it's now SSD!!!!
And that's all for now 🙂