hdparm failed with error ” HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device. “

One of my friend was trying to run ‘hdparm’ command against guest disk called ‘vdb’ and received above mentioned error.

If the guest disk is shown as ‘vda,vdb..etc’ , those are virtio disks which run by virtio bus.

‘hdparm’ is a command which have to be shot against SATA/IDE disk as mentioned in ‘hdparm’ man page.

The passed ‘ioctl’ errored out as in ‘HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device.’ so, dont use ‘hdparm’ against kvm virtio guest disks..

Leave a Reply

Your email address will not be published. Required fields are marked *