Determining if a drive is in standby mode

Status
Not open for further replies.

NASbox

Guru
Joined
May 8, 2012
Messages
650
When I upgraded my FreeNAS box, I installed an LSI HBA, so now I have drives that are daX, and adaX. I have a script that checks to see if a drive is spun down (I have a secondary pool that is rarely used and stays in power down standby) and not wake it up just to take it's temperature.

I got the camcontrol code from one of the forums here, but I have no idea what that string of bytes is all about or exactly how this command works. I assume camcontrol is sending that string of bytes to the disk drive, and those bytes are some sort of command to generate a status report???

Code:
adastat () { echo -n `camcontrol cmd $1 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r - | awk '{print $10 " " ; }'` " " ; }


The reason for this post is that this command works fine on the adaX drives, but the daX drives (LSI HBA) cause it to choke.

Any suggestions? Thanks.
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
Status
Not open for further replies.
Top