Follow these best practices when you use flash devices in vSphere environment.

  • Use flash devices approved by the VMware Compatibility Guide.
  • Make sure to use the latest firmware with flash devices. Frequently check with your storage vendors for any updates.
  • Carefully monitor how intensively you use the flash device and calculate its estimated lifetime. The lifetime expectancy depends on how actively you continue to use the flash device. See Estimate Lifetime of Flash Devices.
  • If you use NVMe devices for storage, enable the high-performance plug-in (HPP) to improve your storage performance. For specifics of using the NVMe devices, see VMware High Performance Plug-In and Path Selection Schemes

Monitor Flash Devices

You can monitor certain critical flash device parameters, including Media Wearout Indicator, Temperature, and Reallocated Sector Count, from an ESXi host.

Use the esxcli command to monitor flash devices.

Prerequisites

Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.

Procedure

  • Display the flash device statistics by running the following command:
    esxcli storage core device smart get -d=flash device_ID

Estimate Lifetime of Flash Devices

When working with flash devices, monitor how actively you use them and calculate their estimated lifetime.

Typically, storage vendors provide reliable lifetime estimates for a flash device under ideal conditions. For example, a vendor might guarantee a lifetime of 5 years under the condition of 20 GB writes per day. However, the more realistic life expectancy of the device depends on how many writes per day your ESXi host actually generates. Follow these steps to calculate the lifetime of the flash device.

Prerequisites

Note the number of days passed since the last reboot of your ESXi host. For example, ten days.

Procedure

  1. Obtain the total number of blocks written to the flash device since the last reboot.

    Run the esxcli storage core device stats get -d=device_ID command. For example:

    ~ # esxcli storage core device stats get -d t10.xxxxxxxxxxxxxxx
    	Device: t10.xxxxxxxxxxxxxxx
    	Successful Commands: xxxxxxx
    	Blocks Read: xxxxxxxx
    	Blocks Written: 629145600 
    	Read Operations: xxxxxxxx
    

    The Blocks Written item in the output shows the number of blocks written to the device since the last reboot. In this example, the value is 629,145,600. After each reboot, it resets to 0.

  2. Calculate the total number of writes and convert to GB.
    One block is 512 bytes. To calculate the total number of writes, multiply the Blocks Written value by 512, and convert the resulting value to GB.

    In this example, the total number of writes since the last reboot is approximately 322 GB.

  3. Estimate the average number of writes per day in GB.
    Divide the total number of writes by the number of days since the last reboot.

    If the last reboot was ten days ago, you get 32 GB of writes per day. You can average this number over the time period.

  4. Estimate lifetime of your device by using the following formula:
    vendor provided number of writes per day times vendor provided life span divided by actual average number of writes per day
    For example, if your vendor guarantees a lifetime of 5 years under the condition of 20 GB writes per day, and the actual number of writes per day is 30 GB, the life span of your flash device will be approximately 3.3 years.

Keeping Flash Disks VMFS-Free

If you use the auto-partitioning boot option when installing or auto-deploying ESXi, the auto-partitioning option creates a VMFS datastore on your host's local storage. In certain cases, you need to keep your local storage flash disks unformatted.

Problem

By default, auto-partitioning deploys VMFS file systems on any unused local storage disks on your host, including flash disks.

However, a flash disk formatted with VMFS becomes unavailable for such features as virtual flash and vSAN. Both features require an unformatted flash disk and neither can share the disk with any other file system.

Solution

To ensure that auto-partitioning does not format the flash disk with VMFS, use the following boot options when you install ESXi or boot the ESXi host for the first time:
  • autoPartition=TRUE
  • skipPartitioningSsds=TRUE
If you use Auto Deploy, set these parameters on a reference ESXi host.
  1. In the vSphere Client, navigate to the host to use as a reference host and click the Configure tab.
  2. Click System to open the system options, and click Advanced System Settings.
  3. Set the following items.
    Parameter Value
    VMkernel.Boot.autoPartition True
    VMkernel.Boot.skipPartitioningSsds True
  4. Reboot the host.

If flash disks that you plan to use with the virtual flash resource and vSAN already have VMFS datastores, remove the datastores.