Unsure of SATA drive spindown

Status
Not open for further replies.

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
I've set spindown to 15 minutes in the FreeNAS GUI, but I'm not sure this is happening. Is there anyway of checking?

Also I'm seing these messages when I boot up:

Code:
Jul 15 22:22:28 nas01 kernel: ataidle: 
Jul 15 22:22:28 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:28 nas01 kernel: 
Jul 15 22:22:28 nas01 kernel: ataidle: 
Jul 15 22:22:28 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:28 nas01 kernel: 
Jul 15 22:22:28 nas01 kernel: ataidle: 
Jul 15 22:22:28 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:28 nas01 kernel: 
Jul 15 22:22:28 nas01 kernel: ataidle: 
Jul 15 22:22:28 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:28 nas01 kernel: 
Jul 15 22:22:28 nas01 kernel: ataidle: 
Jul 15 22:22:28 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:28 nas01 kernel: 
Jul 15 22:22:29 nas01 kernel: ataidle: 
Jul 15 22:22:29 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:29 nas01 kernel: 
Jul 15 22:22:29 nas01 kernel: ataidle: 
Jul 15 22:22:29 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:29 nas01 kernel: 
Jul 15 22:22:29 nas01 kernel: ataidle: 
Jul 15 22:22:29 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:29 nas01 kernel: 
Jul 15 22:22:29 nas01 kernel: ataidle: 
Jul 15 22:22:29 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:29 nas01 kernel: 
Jul 15 22:22:29 nas01 kernel: ataidle: 
Jul 15 22:22:29 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:29 nas01 kernel: 
Jul 15 22:22:30 nas01 kernel: ataidle: 
Jul 15 22:22:30 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:30 nas01 kernel: 
Jul 15 22:22:30 nas01 kernel: ataidle: 
Jul 15 22:22:30 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:30 nas01 kernel: 
Jul 15 22:22:30 nas01 kernel: ataidle: 
Jul 15 22:22:30 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:30 nas01 kernel: 
Jul 15 22:22:30 nas01 kernel: ataidle: 
Jul 15 22:22:30 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:30 nas01 kernel: 
Jul 15 22:22:30 nas01 kernel: ataidle: 
Jul 15 22:22:30 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:30 nas01 kernel: 
Jul 15 22:22:30 nas01 kernel: ataidle: 
Jul 15 22:22:30 nas01 kernel: the device does not support advanced power management
Jul 15 22:22:30 nas01 kernel: 


Here's the output of "ataidle ada0":
Code:
nas01# ataidle ada0
Model:                  WDC WD20EARS-00MVWB0
Serial:                 WD-WCAZA3677231
Firmware Rev:           51.0AB51
ATA revision:           ATA-8
LBA 48:                 yes
Geometry:               16383 cyls, 16 heads, 63 spt
Capacity:               1863GB
SMART Supported:        yes
SMART Enabled:          yes
Write Cache Supported:  yes
Write Cache Enabled:            yes
APM Supported:          no
AAM Supported:          yes
AAM Enabled:            no
Vendor Recommended AAM: 1


This command -> nas01# ataidle -I 330 ada0 does not yield any output.

Many thanks for any replies
/Jim
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
Probably due to your SAS HBA.

I'm using an LSI 9211-8i and I've got no spin down either, and have the same ataidle messages during boot despite all the disks (SATA Samsung) physically supporting spin down.

I think it's a FreeBSD/LSI driver issue.
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
Yeah I was thinking the same, but oddly I also get those messages from my drives sitting on the Intel AHCI bus.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
So you are using the MB SATA ports?

I assume based on your data that you ran the command directly from the FreeNAS computer through the shell (option 9). True?

If you entered "ataidle ada0" and received an output, you should have received a pass/fail if you enter "ataidle -I 5 ada0" (you don't need to use 330 minutes).

I don't believe the fact your using AHCI makes a difference however you might change it to IDE to see.

I have tried Beta-4 and the ataidle function works on my system but I don't have AHCI.
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
So you are using the MB SATA ports?

I assume based on your data that you ran the command directly from the FreeNAS computer through the shell (option 9). True?

If you entered "ataidle ada0" and received an output, you should have received a pass/fail if you enter "ataidle -I 5 ada0" (you don't need to use 330 minutes).

I don't believe the fact your using AHCI makes a difference however you might change it to IDE to see.

I have tried Beta-4 and the ataidle function works on my system but I don't have AHCI.


8 Motherboard SATA ports
8 SAS Controller SATA ports

ataidle -I 5 ada0 yields no output:


nas01#
nas01#
nas01# ataidle -I 5 ada0
nas01#
nas01#
nas01#

All commands are run from a SSH session.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
from ssh you might need to add full path as I had to... 'ataidle -I 5 /dev/ada0'

I still don't get the fact you got no message at all, not a pass nor a fail. If you use 'ataidle -S 5 /dev/ada0' it should spin down immediately and you might hear it although 16 drives is a lot of drive noise.

Let me know if anything works.
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
from ssh you might need to add full path as I had to... 'ataidle -I 5 /dev/ada0'

I still don't get the fact you got no message at all, not a pass nor a fail. If you use 'ataidle -S 5 /dev/ada0' it should spin down immediately and you might hear it although 16 drives is a lot of drive noise.

Let me know if anything works.

Thanks for your help, but the command still yields no output :( I've tried the command on all my drives, thereafter accessing the shares, no delay at all. This probably means that no drives are spun down.

Is there any way of verifying if the spindown is successfull? A logfile or something?

Thanks
Jim

EDIT: here's the output of "ataidle ada0"

Code:
nas01# ataidle ada0
Model:                  WDC WD20EARS-00MVWB0
Serial:                 WD-WCAZA3677231
Firmware Rev:           51.0AB51
ATA revision:           ATA-8
LBA 48:                 yes
Geometry:               16383 cyls, 16 heads, 63 spt
Capacity:               1863GB
SMART Supported:        yes
SMART Enabled:          yes
Write Cache Supported:  yes
Write Cache Enabled:            yes
APM Supported:          no
AAM Supported:          yes
AAM Enabled:            no
Vendor Recommended AAM: 1


APM Supported: no - does that mean my drive does not support the spindown offered by FreeNAS????
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Jim,
APM Supported means Advanced Power Management only, not being able to spin down the hard drives. I did a quick search on the internet and I didn't see any issues related to spin down/idle reported. It would be good to hear from someone who has the exact model you do an report if they can get theirs to idle.

I don't know of a log but that doesn't mean it doesn't exist, I just don't know where it would be if it exists.

-Mark
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
Doing this:

Code:
nas01# ataidle -S 5 /dev/ada0
nas01# ataidle -S 5 /dev/ada1
nas01# ataidle -S 5 /dev/ada2
nas01# ataidle -S 5 /dev/ada3
nas01# ataidle -S 5 /dev/ada4
nas01# ataidle -S 5 /dev/ada5
nas01# ataidle -S 5 /dev/ada6
nas01# ataidle -S 5 /dev/ada7


Drops the FreeNAS power usage from ~156 Watts to ~130 Watts.
So the 8 drives attached to the Intel ACHI Motherboard Controller, definatly spindown when I issue above commands.

Although this is what happens when I issue the same command for the 8 drives sitting on the LSI SAS HBA:

Code:
nas01# ataidle -S 5 /dev/da0
ataidle: the device does not support power management


So I guess it a LSI+FreeBSD issue?!

Now on to the weird part here!
I've set spindown to 15 minutes in the FreeNAS web console. This does NOT seem to work! I've had the machine on for 2+ hours, without the 8 drives spindown. Anyone else seeing the same issue?

Thanks
Jim

EDIT:

Doing this, stopped the drives attached to the LSI SAS HBA:


Code:
nas01# camcontrol stop da0
Unit stopped successfully
nas01# camcontrol stop da1
Unit stopped successfully
nas01# camcontrol stop da2
Unit stopped successfully
nas01# camcontrol stop da3
Unit stopped successfully
nas01# camcontrol stop da4
Unit stopped successfully
nas01# camcontrol stop da5
Unit stopped successfully
nas01# camcontrol stop da6
Unit stopped successfully
nas01# camcontrol stop da7
Unit stopped successfully
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Jim,
Thanks for that info. First the drives on the motherboard. Try setting the time to 5 minutes. If the ataidle command works manually, setting the HDD Standby time to 5 Minutes should cause it to spin down. Or just leave it at 15 minutes and give it more time. Maybe you had a few small disk accesses which caused the timer to not activate. I have mine set to 120 minutes and they spin down properly.

For the LSI board: So typing camcontrol stop da0 will force the drive to spin down? Can you try this command "camcontrol idle da0 -t 5" and see if the drive spins down after 5 minutes. Do this for all 8 of the drives and while you're at it, do it on the ada drives too but since this is a SCSI related command, it might not work. IF this works then we can get a few more folks to try it and I can make a change to the software and get the spin down corrected. I will test this command out on my machine when I get home tonight. We can talk later about a custom build if it all works, or when we get it to work.

-Mark
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Jim,
Due to your efforts I believe I have the solution. Do this for all your drives:

Code:
camcontrol standby ada0 -t 900
Time is in seconds so don't use single digits or the drives will constantly spin up and down and you will never get anywhere except probably need to replace a drive.

After 15 minutes your drives should be down. I will write a code change and build a new distribution. If you want a copy of it you can either build it yourself if you are set up to do that or I could PM you a location to FTP into and grab a copy to try. I should have it ready tonight but first I will test it on my system. This would not be Beta-4, it will be the current build 7003 with my minor modifications in the ix-ataidle file. I'll update this posting once it works for me, building it as I submit this message. This has the potential to solve some problems (I hope).

-Mark

P.S. I can't share with everyone, my u/l speed is SLOW. Cheap Cable Company!
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
That sounds fantastic, Mark. I'll try first thing, when I get off work today. If you can supply me with FTP details, I'm able to share the build on my dedicated server in Germany for the rest of the people interested.

Thanks a bunch
/Jim
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
@Joe

why not put it up as a bit-torrent? If a couple of us here on the Forum download the image and keep sharing it everybody will benefit and your connection won't overload.
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
Oh BTW, Mark.

I haven't been able to test yet, but I'm pretty sure that the "camcontrol standby" ONLY works with drives attached directly to the motherboard. For drives on controllers, only the "camcontrol stop" command will actually work.

Will test later, just a heads up...


/Jim
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Oh BTW, Mark.

I haven't been able to test yet, but I'm pretty sure that the "camcontrol standby" ONLY works with drives attached directly to the motherboard. For drives on controllers, only the "camcontrol stop" command will actually work.

Will test later, just a heads up...


/Jim

Jim,
If "standby" doesn't work, then I don't have a fix. The "stop" command would have to be issued every time you wanted the drives to spin down, it doesn't set a timer in the hard drive like the standby command does. Please test out the standby command and let me know.

EDIT: If you issue the "idle" command it should shut the drive down immediately. Remember the value after the -t is in seconds, not minutes. camcontrol idle da0 -t 90 would be 1.5 minutes but should shut down immediately and then after the next spin-up, shut down after 1.5 minutes of inactivity. I did get a build to work but I need to get the math correct to compensate for the seconds value.

-Mark
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
As I expected, this is what I get :(

Onboard drive:

Code:
nas01# camcontrol standby ada0 -t 900


LSI SAS HBA drive:

Code:
nas01# camcontrol standby da0 -t 900
(pass2:mpt0:0:3:0): STANDBY. ACB: e2 00 00 00 00 40 00 00 00 00 b4 00
(pass2:mpt0:0:3:0): CAM status: CCB request was invalid



Apperently camcontrol can't communicate properly with the SAS controller. Searching the web, results in many pages with the same error, all FreeBSD.

Guess I'll have to live with it :(

EDIT: I did find this script, might be what I need, if I can add it to cron properly. http://forums.servethehome.com/show...rol-device-spindown-spinup-scripts-for-zpools
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Jim,
did you wait to see if the drive spun down? The error response may be invalid, or I really hope so. I looked at the scripts and they appear to not be timer based. You send the command to start or stop the drives. It's not the same as using a timer.
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
Are the camcontrol commands/setting retained between reboots?
 

jim82

Dabbler
Joined
Jul 5, 2011
Messages
44
Didn't actually wait, as the command seemed invalid. I know the script is based on the start/stop method, and not the an idle function.

Camcontrol are NOT kept after reboot.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Are the camcontrol commands/setting retained between reboots?
Camcontrol would need to be reissued just like ataidle.

@Jim
Please try again and wait to see if it times out. The Developers just introduced a cam patch to hide invalid return messages. I'm hoping your message is invalid as well. Try something like a 120 value, walk away for 5 minutes and see if the drives are spun down. Use the standby command on all your drives, just pretend you don't see that error message.

-Mark
 
Status
Not open for further replies.
Top