Verify NVMe Dataset Management (Deallocate/UNMAP) is supported the NVME storage device.
search cancel

Verify NVMe Dataset Management (Deallocate/UNMAP) is supported the NVME storage device.

book

Article ID: 432901

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article outlines steps to verify whether the NVMe storage device supports the Deallocate/UNMAP command.

  • Space reclamation for NVMe namespaces relies on the NVMe Dataset Management (DSM) Deallocate command rather than SCSI UNMAP. If the underlying storage array's NVM subsystem does not advertise support for Dataset Management via its Optional NVM Command Support (ONCS) bitmask, the ESXi host cannot issue Deallocate commands, regardless of host-side configuration.

  • Administrators may observe that automatic space reclamation (UNMAP) is not functioning on VMFS6 datastores backed by NVMe devices.

Note: While attempting to verify space reclamation support using traditional SCSI VAAI commands (e.g., `esxcli storage core device vaai status get`) incorrectly reports "unsupported" for Delete, Clone, and Zero operations. Cause the SCSI VAAI primitives are incompatible with the NVMe protocol.

Environment

VMware vSphere 8.0 and later

Resolution

To verify the active NVMe transport protocol and validate if the storage array supports the NVMe Deallocate command, perform the following steps from the ESXi command line:

  1. List the connected NVMe controllers to verify the active transport protocol (e.g., FC, TCP, RDMA, PCIe):

      'esxcli nvme controller list'

       Review the 'Transport' column for the active protocol. Note the exact string in the 'Name' column (the controller NQN) for the storage array in question.

  2. Query the NVMe controller's identification data structure using the recorded Name:

     'esxcli nvme controller identify -c <Controller_Name>'

  3. Scroll through the output and locate the `ONCS` (Optional NVM Command Support) field.

  4. Analyze the `ONCS` hexadecimal value. Support for the Deallocate command is dictated strictly by Bit 2 of this value (the third bit from the right, where the first bit is Bit 0).

       - Convert the reported Hexadecimal value to Binary.

       - If Bit 2 is '1' (e.g., Hex values '0x14', '0x1c', '0x1f', '0x04'), the array natively supports Dataset Management (Deallocate).

       - If Bit 2 is '0' (e.g., Hex values '0x10', '0x00'), the array does NOT support Dataset Management.

    Example : 

    [root@esxi:/vmfs/volumes/Datastore/log] esxcli nvme controller identify -c nqn.1994-04.jp.co.hitachi:nvme:storage-subsystem-sn.8-40874-nvmssid.00001#vmhba64#5#############:###############
    Name        Value      Description
    ----------  ---------  -----------
    ONCS        0x4        Optional NVM Command Support  -  > the array natively supports Dataset Management.
    or 
    ONCS        0x10       Optional NVM Command Support  -  > the array does NOT support Dataset Management.

Note:  

  • The storage vendor must be engaged. If the array reports '0' for Bit 2, it indicates that automatic space reclamation cannot function. 

  • If the storage array supports Dataset Management (Bit 2 = 1), ESXi still requires the feature to be explicitly enabled on the ESXi host. Ensure the advanced setting 'NvmeUseDsmTp4040' is set to '1' using the following command:

    'esxcfg-advcfg -g /Scsi/NvmeUseDsmTp4040'

Reference: Broadcom KB 394789 - Enabling UNMAP for NVMe devices