Symptoms
RHEL and Ubuntu Guest OS failure may be seen when fstrim command is triggered from OS side/var/log/messages
Oct 12 21:15:32 <name> kernel: sd 0:0:1:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0sOct 12 21:15:32 <name> kernel: sd 0:0:1:0: [sdb] Sense Key : Vendor Specific(9) [current]Oct 12 21:15:32 <name>kernel: sd 0:0:1:0: [sdb] <<vendor>>ASC=0x80 <<vendor>>ASCQ=0x85Oct 12 21:15:32 <name> kernel: sd 0:0:1:0: [sdb] CDB: Write same(16) 93 08 00 00 00 00 06 1e b2 58 00 00 20 00 00 00Oct 12 21:15:32 <name> kernel: blk_update_request: I/O error, dev sdb, sector 102675032Oct 12 21:15:32 <name> kernel: sd 0:0:1:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0sOct 12 21:15:32 <name> kernel: sd 0:0:1:0: [sdb] Sense Key : Vendor Specific(9) [current]Oct 12 21:15:32 <name> kernel: sd 0:0:1:0: [sdb] <<vendor>>ASC=0x80 <<vendor>>ASCQ=0x85Oct 12 21:15:32 <name> kernel: sd 0:0:1:0: [sdb] CDB: Write same(16) 93 08 00 00 00 00 06 1e d2 58 00 00 20 00 00 00Oct 12 21:15:32 <name> kernel: blk_update_request: I/O error, dev sdb, sector 102683224Oct 12 21:15:32 <name> kernel: XFS (dm-8): discard failed for extent [0x2bdb0d,7], error -5
Cause
For certain workloads the Guest OS issued unmap can fail due to resource contention on ESXi side.UNMAPs/ WRITE SAME issued by Guest OS need to lock a given resource cluster on the VMFS file system and if the same resource cluster is locked by a different work flow such as space allocation, then unamp request fails with resource contention.Issue is not seen always and will be seen along with other workload that can cause resource contention for the unmap request.
Resolution
VMware is aware of this issue and working to resolve this in a future release.