VMware Virtual SAN Cookbook
上QQ阅读APP看书,第一时间看更新

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.

Note

If your storage controllers present disks to the ESXi host in pass-through mode, you may skip this recipe as the ESXi storage stack would automatically detect the SSD devices.

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…

  1. In the vSphere Web Client, navigate to: Home | Hosts and Clusters | Datacenter | Cluster | Host | Manage | Storage | Storage Devices:
    How to do it…
  2. Find your SSD device in the list and highlight it. In this case, the SSD is the 17.00 GB device:
    How to do it…
  3. In the lower pane, highlight and copy the identifier to the clipboard.
  4. This will usually begin with naa., but depending on your storage controller type, it could also begin with mpx., t10., or eui.
  5. Log in to the ESXi host via SSH as the root user.
  6. 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
    
  7. 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 indicates Is 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"
    

    For example:

    # esxcli storage nmpsatp rule add --satp=VMW_SATP_LOCAL --device naa.6000c29580eef5fec51c984a7a662bbc --option "enable_ssd"
    
  8. Load your new claim rule and execute it:
    # esxcli storage core claimrule load
    # esxcli storage core claimrule run
    
  9. 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
    
  10. Rescan your storage adapters:
    # esxcli storage core adapter rescan --all
    
  11. 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
    
  12. Rerun the esxcli storage core device list -d <disk identifier> command as in step 5. You should find that the disk now reads Is SSD: true and Is Local: true.
  13. 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.