# hdparm on SATA discs (howto?)

## Henrik Olsen

I'm sitting with a machine with 3 x Seagate 7200.7 SATA discs on a Promise TX4 SATA controller. I'm running the 2.6.0 kernel from gentoo-dev-sources.

I cannot make hdparm work on them, since it's only for ATA/IDE as I understand it.

I get the following:

```
root # hdparm -S 244 /dev/sdc

/dev/sdc:

 operation not supported on SCSI disks
```

How can I make the discs sleep after X seconds of inactivity, when hdparm cannot be used for this purpose?

Anyone know how expensive (in power consumption) it is to spin a disc up? Some say that the same amount of power can hold the disc idle for at least 30 minutes...

And what about reading out the harddisc temperatur from a SATA disc? It seems that lm_sensors and similar utils doesn't support SATA discs yet, right?

----------

## 2fj02jf2

I just installed the same controller with three wester digital drives and ran into the same question. Do you know more by now? So far I haven't been able to find anything on the spin down issue anywhere.

----------

## pi314

I found this datasheed with following informations about powerconsumtion for those seagate baracuda 7200.7

 *Quote:*   

> 12 VDC ±10% (amps max) 2.8
> 
> Power Management (watts)
> 
> Seek 12.5
> ...

 

----------

## cbradney

Did you manage to find out how to powerdown a SATA connected drive?

----------

## breakerfall

I too would fine this info useful... I have an ATA IDE drive connected to a RAID IDE channel (which is working as a standard ATA) but detected as /dev/sda - therefore hdparm won't let me add DMA support to the disk.

Anyone know how I can add UDMA mode to this drive?

Thanks

----------

## lwithers

Check out blktool from http://sourceforge.net/projects/gkernel/. It's supposed to be a better version of hdparm. It was written by Jeff Garzik, who is very involved in the SATA side of things in the kernel, so it might well have support for all this stuff. I haven't had time to look at it yet myself, so I'd appreciate it if somebody could post a summary.

----------

## breakerfall

Looks interesting.... I had a quick dabble with it and it failed to compile, with errors - but looking up on the net, I found this: http://www.webservertalk.com/message351323.html

Most likely, RAID / SCSI support will not be included yet. I'll be more than happy if someone chooses to prove me wrong. But in the meantime I'll give this tool another shot.  :Wink: 

----------

## stig

Does somebody managed to do this? It would be nice to get the noise level down when I'm sleeping....

----------

## <3

bumpage, I too am having the same problem and would like to get this resolved.

----------

## pjp

Moved from Installing Gentoo

----------

## <3

*BUMPED into a new forum*

----------

## <3

ok i finally got it. Using kernel 2.6.14 you can spin down your sata drive using sdparm.

```
#sdparm -C stop /dev/sdb

    /dev/sdb: ATA       ST3200826AS       3.02
```

now i am trying to figure out how to put it to sleep automatically

----------

## New User

 *Quote:*   

> #sdparm -C stop /dev/sdb 
> 
>     /dev/sdb: ATA       ST3200826AS       3.02

 

Now that looks interesting.  Does that actually sop the drive.  Can this be used to stop it before pulling it out? hot-swap it, perhaps?  If so, it may be very usefull with hotplug or something.

Does one need to emerge this  - and is it only available with the 2.6.14 kernel?

----------

## KKtm

Just tested it with Vanilla 2.6.14-rc5 kernel.

The HD stopped spinning... But just to restart about a second later.

----------

## <3

 *New User wrote:*   

> Now that looks interesting.  Does that actually sop the drive.  Can this be used to stop it before pulling it out? hot-swap it, perhaps?  If so, it may be very usefull with hotplug or something.
> 
> Does one need to emerge this  - and is it only available with the 2.6.14 kernel?

 

Yes it actually does stop the drive. The 2.6.14 kernel includes the [ur=http://linux.yyz.us/sata/software-status.html#pm]ATA Passthru[/url] patch so that you can spin down the hd. This is why I was so egar to upgrade to kernel 2.6.14.

 *KKtm wrote:*   

> Just tested it with Vanilla 2.6.14-rc5 kernel.
> 
> The HD stopped spinning... But just to restart about a second later.

 

It is going to restart if you use the drive. Works fine for me.

----------

