Hi, VM on VMware 6.7 with pvscsi and thinly provisioned disk generates the following error: (da0:pvscsi0:0:0:0): UNMAP failed, disabling BIO_DELETE (da0:pvscsi0:0:0:0): UNMAP. CDB: 42 00 00 00 00 00 00 00 08 00 (da0:pvscsi0:0:0:0): CAM status: SCSI Status Error (da0:pvscsi0:0:0:0): SCSI status: Check Condition (da0:pvscsi0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB) (da0:pvscsi0:0:0:0): Command byte 7 is invalid (da0:pvscsi0:0:0:0): Error 22, Unretryable error This error occurs when I try to run zpool trim zroot. When I replace the VM's SCSI controller with SATA, trimming seems to be working ok.
Confirmed same behavior with ESXi 8.0 and FreeBSD 13.2-p1.
^Triage: clear unneeded flags. Nothing has yet been committed to be merged.
MARKED AS SPAM
It appears that VMware falsely reports that it supports UNMAP but actually not. Can you verify that the underlaying filesystem is VMFS6 or vSAN 6.7 Update 2 ? 1. https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.storage.doc/GUID-B40D1420-26FD-4318-8A72-FA29C9A395C2.html 2. https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vsan.doc/GUID-0D401315-366D-4E5C-AF9F-3D2FBCE020C2.html
Tested with 13.1-RELEASE and latest stable/13 (FreeBSD 13.4-STABLE stable/13-n258978-519121f5ea03 GENERIC amd64) on ESXi 6.7.0, both pvscsi and emulated sata controller work as intended. ``` # root@:~ # zpool trim tank && zpool trim testpool && zpool status pool: tank state: ONLINE config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 da1 ONLINE 0 0 0 (trimming) errors: No known data errors pool: testpool state: ONLINE config: NAME STATE READ WRITE CKSUM testpool ONLINE 0 0 0 ada0 ONLINE 0 0 0 (trimming) errors: No known data errors ```