Disabling the write-cache for a virtual disk fails with 'SG_IO: bad/missing sense data' - hdparm

Solution Verified - Updated -

Issue

  • To perform a disk benchmark through a virtual machine it is recommended to disable virtual disk write-cache.
  • In case there is a SCSI virtual disk attached to the virtual machine it's not possible to use hdparm for this operation.

    $ hdparm -i /dev/sdb
    /dev/sdb:
    SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00     00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     HDIO_GET_IDENTITY failed: Invalid argument
    

Environment

  • Red Hat Enterprise Linux (RHEL) 7.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In