After last update of kernel i have problem with issuing command with hdparm and it is confirmed. I am at kernel v6.6.44
$ hdparm -C /dev/sda
/dev/sda:
SG_IO: bad/missing sense data, sb[]: f0 00 01 00 50 40 ff 0a 00 00 78 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
drive state is: unknown
While the expected output is the following:
$ hdparm -C /dev/sda
/dev/sda:
drive state is: active/idle
There was a commit in v6.6.44 and it was backported to the
v6.10.3 and v6.1.103 according to Christian Heusel and it breaks something with hdparm.
#regzbot introduced: 28ab9769117c
#regzbot title: ata: libata-scsi: Sense data errors breaking hdparm with WD drives
Please check because it is affecting not only WD but whole array of SATA devices (my HDD is not WD btw).
Full post from kernel org is here
Full message from **Christian Heusel**
Hello Igor, hello Niklas,
on my NAS I am encountering the following issue since v6.6.44 (LTS),
when executing the hdparm command for my WD-WCC7K4NLX884 drives to get
the active or standby state:$ hdparm -C /dev/sda /dev/sda: SG_IO: bad/missing sense data, sb[]: f0 00 01 00 50 40 ff 0a 00 00 78 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 drive state is: unknown
While the expected output is the following:
$ hdparm -C /dev/sda /dev/sda: drive state is: active/idle
I did a bisection within the stable series and found the following
commit to be the first bad one:28ab9769117c ("ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error")
According to kernel.dance the same commit was also backported to the
v6.10.3 and v6.1.103 stable kernels and I could not find any commit or
pending patch with a “Fixes:” tag for the offending commit.So far I have not been able to test with the mainline kernel as this is
a remote device which I couldn’t rescue in case of a boot failure. Also
just for transparency it does have the out of tree ZFS module loaded,
but AFAIU this shouldn’t be an issue here, as the commit seems clearly
related to the error. If needed I can test with an untainted mainline
kernel on Friday when I’m near the device.I have attached the output of hdparm -I below and would be happy to
provide further debug information or test patches.Cheers,
Christian
#regzbot introduced: 28ab9769117c
#regzbot title: ata: libata-scsi: Sense data errors breaking hdparm with WD drives