Tagging disks as local solid-state drives (if applicable)
Note
If you are running vSphere 6.0, please skip this section and refer to the Tagging disks as SSDs in vSphere 6.0 recipe in Chapter 9, VSAN 6.0, if you need to tag your disks as SSDs.
Depending on the type of storage controller you are using, you may need to tell ESXi which disks are your solid-state drives. If your storage controllers present disks to the ESXi as a RAID-0 device, you will need to follow this recipe to inform ESXi about which disks are your SSDs. This recipe must be followed if devices that you know to be SSDs are detected as non-SSDs.
Getting ready
- You should have enabled SSH on your ESXi hosts that are used for VSAN (see previous recipe)
- You should know the size/capacity of your SSD device(s) so that they can be identified and tagged
- You should be logged in to the vSphere Web Client as an administrator or user, authorized to view host storage settings
- You should know your ESXi host root password(s)
How to do it…
- In the vSphere Web Client, navigate to: Home | Hosts and Clusters | Datacenter | Cluster | Host | Manage | Storage | Storage Devices:
- Find your SSD device in the list and highlight it. In this case, the SSD is the 17.00 GB device:
- In the lower pane, highlight and copy the identifier to the clipboard.
- This will usually begin with
naa.
, but depending on your storage controller type, it could also begin withmpx.
,t10.
, oreui
. - Log in to the ESXi host via SSH as the root user.
- Get disk information about the device. You should see information about the device, including
Is SSD: false
. The command to run is:# esxcli storage core device list –d <disk identifier>
For example:
# esxcli storage core device list -d naa.6000c29580eef5fec51c984a7a662bbc naa.6000c29580eef5fec51c984a7a662bbc Display Name: Local VMware Disk (naa.6000c29580eef5fec51c984a7a662bbc) Has Settable Display Name: true Size: 17408 Device Type: Direct-Access Multipath Plugin: NMP Devfs Path: /vmfs/devices/disks/naa.6000c29580eef5fec51c984a7a662bbc Vendor: VMware Model: Virtual disk Revision: 1.0 SCSI Level: 2 Is Pseudo: false Status: on Is RDM Capable: false Is Local: true Is Removable: false Is SSD: false
- Write an SATP claim rule to identify the disk as an SSD. The command to run this is:
# esxcli storage nmpsatp rule add --satp=VMW_SATP_LOCAL --device <disk identifier> --option "enable_ssd"
Note
If the
esxcli storage core device list
output indicatesIs Local: false
, then you will also need to tag the disk as a local device. If you need to perform this step, the command is:# esxcli storage nmpsatp rule add --satp=VMW_SATP_LOCAL --device <disk identifier> --option "enable_ssd enable_local"
# esxcli storage nmpsatp rule add --satp=VMW_SATP_LOCAL --device naa.6000c29580eef5fec51c984a7a662bbc --option "enable_ssd"
- Load your new claim rule and execute it:
# esxcli storage core claimrule load # esxcli storage core claimrule run
- Unclaim your SSD device. This will permit it to be rediscovered as an SSD. The command to do this is:
# esxcli storage core claiming unclaim --type=device --device <disk identifier>
For example:
# esxcli storage core claiming unclaim --type=device --device naa.6000c29580eef5fec51c984a7a662bbc
- Rescan your storage adapters:
# esxcli storage core adapter rescan --all
- Reclaim the storage device using the new rules. The command to do this is:
# esxcli storage core claiming reclaim --device <disk identifier>
For example:
# esxcli storage core claiming reclaim --device naa.6000c29580eef5fec51c984a7a662bbc
- Rerun the
esxcli storage core device list -d <disk identifier>
command as in step 5. You should find that the disk now readsIs SSD: true
andIs Local: true
. - Complete this recipe on all the hosts in the VSAN cluster.
How it works…
The reason this step is necessary relates to VSAN requirements in the context of how storage controllers present devices to the hypervisor's storage stack. VSAN requires an SSD device, and validates that the device is an SSD by reading the device inquiry data.
With pass-through devices (raw disks), this is easily achieved as the SSD will identify itself as such during standard SCSI inquiry. On non-pass-through (RAID-0) devices, however, this is not the case and the RAID device will not provide any SSD-related information during a standard SCSI inquiry. When using RAID-0 mode, ESXi is not being given a disk as such—it is being given a logical RAID device provisioned by the storage controller. The fact that there is only one disk in that RAID set and that the one disk is an SSD is unfortunately immaterial. The storage controller presents a device to the ESXi host using its own presentation rules, and that does not include SSD information on any controller currently certified for use with VSAN.
Because of this, we must manually override the default settings obtained through the SCSI inquiry. The process outlined in this recipe does exactly that. We identify the device that we, as administrators, know to be the SSD. We then write a custom rule to instruct ESXi to override the information obtained via the SCSI inquiry with our pre-defined information. This allows ESXi to identify the device as a local SSD. In turn, this will allow the VSAN processes to identify the SSD and differentiate it from regular spinning disks when we build disk groups later in this chapter.