# Power down eSATA drives at shutdown -p



## tdoubleyoo (Jan 6, 2010)

Hi,

does any of you know a possibility to power down external SATA drives when shutting down FreeBSD with shutdown -p? 

My situation is as follows:
- FreeBSD 8.0-STABLE, GENERIC kernel
- 3x Seagate 1TB HD at an Silicon Image 4-Port SATA-Controller
- "shutdown -p now" powers down system, but leaves eSATA drives powered up and spinning

I can use atacontrol or ataidle do spin down disks or set spin-down timers, but the final SYNC the kernel issues before powering off wakes them up again.

Here 
http://lists.freebsd.org/pipermail/freebsd-acpi/2006-February/002566.html
and here
http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg67333.html
the same problem is discussed for another use case. They suggest altering the ad_shutdown function in the kernel's ata-driver, which helps for shutdown -h or shutdown -r, but not shutdown -p :-( 

Any ideas? 

Thomas


----------



## hedwards (Jan 7, 2010)

Probably the easiest thing to do is to just buy specialized hardware that does that. I've seen some like these that seem to do what you want. http://www.cyberguys.com/product-details/?productid=29498

It should do what you want automatically, but it involves buying it and it isn't necessarily good for hard disks to be hooked up without a line conditioner.


----------



## tdoubleyoo (Jan 7, 2010)

*hmm... should work...*

Thanks, wasn't aware of that stuff. But it would be a hardware-workaround for a software-problem, which is not elegant... Still good to know, that this would be a possibility.

Further ideas, anyone?

Thomas


----------



## zapher (Jan 7, 2010)

How is it a hardware-"workaround"?

Your regular _internal_ drives all power down when the power is cut from the PSU. So how is this different?


----------



## tdoubleyoo (Jan 7, 2010)

*Hardware workaround*

In the way that my problem is the behaviour of a piece of software (freebsd kernel), which seems to have no option to spin down external drives before powering off the whole system. Linux does this, for example... but unfortunately that's no help.

Applying a new piece of hardware is OK, but in this sense a hardware-workaround for a problem I'd prefer to solve in software 

Thomas


----------

