hdparm -C drive state incorrect for HW raid
Brought to you by:
ideguy
I have an Adaptec ASR-51245 with 2 x 4TB configured as RAID 1. All under Ubuntu 14.04 LTS Server
When the drive is active hdparm -C reports:
root@Charon:/var/log# hdparm -C /dev/sda1
/dev/sda1:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
drive state is: standby
root@Charon:/var/log
A SATA device on the same controller is correctly reported as active:
root@Charon:/var/log# hdparm -C /dev/sdb
/dev/sdb:
drive state is: active/idle
root@Charon:/var/log
Thanks
Dave
Just a short note to say that "smartctl -i -n standby" seems to be able correctly to identify whether the drive is active or in standby, so it may well be worth looking at smartctl code to see how the author of that code section checks for idle, sleep and standby power states.
Dave