Unfortunately we have large number of virtual Microsoft failover cluster with RDM’s in virtual compatibility mode. Moving to SQL Always On is too expensive and our application owners refuse to acknowledge HA as an alternative. The issue with adding RDM’s is when you need to reboot an ESXi host it rescans for all these devices. As the amount of RDM’s increases this rescanning process can take up to an hr…
Obviously waiting an hr is not acceptable so VMware created the following KB article to perennially reserve these devices. The issue I’ve experienced is when you have 100’s of RDM’s across 30-40 ESXi hosts, gathering all the devices using “esxcli storage core device list” and creating a script can be time consuming.
The solution I found was using RVtools to dump all the vCenter information into an excel file. Once that’s done navigate to the “tabvDisk” tab and extract the device ID’s from the “Raw LUN ID column”.
To perennially reserve the above devices you need to enter the following command.
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000f0 –perennially-reserved=true
However you will quickly notice the device ID in the above syntax is not the same and the RVtools output. To put it into the correct format I do the following in excel…
- Enter the RVtools Raw LUN ID into excel in Column A1
- In C1 enter the following formula “=RIGHT(A1, LEN(A1)-10)“
- In D1 enter the following formula “=LEFT(C1, LEN(C1)-12)”
- In E1 enter the following formula “=CONCATENATE(“esxcli storage core device setconfig -d naa.”,D1,” –perennially-reserved=true ; “) “
That’s should leave you with the values required to perennially reserve the RDM’s. You should then be able to reuse that formula on the remaining Raw LUN ID’s and create the below script.
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000f0 –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000ca –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000c7 –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000c0 –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000bf –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000c0 –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000c7 –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000ca –perennially-reserved=true ; |
esxcli storage core device setconfig -d naa.60060e80101dd410058bdd11000000bf –perennially-reserved=true ; |
This needs to be run on all your hosts in the cluster which have the RDM’s presented. It will allow your ESXi hosts boot up just as quickly as a ESXi host without RDMs. This also makes the adding and removal of storage less painful.
Remember, as devices are added and removed from environment you may need to redo the above as required.The obvious long term solution is SQL always on replication or standalone SQL servers protected with HA.
Leave a Reply