I'm looking for either freeware or the programming basics to power off/on a hard drive. Mounting and unmounting a hard drive is simple enough just using the command prompt in Windows XP. Now I need to be able to power down the hard drive so it will not become damaged when being unplugged. I would prefer this to be a simple doable in the command prompt, a simple script, or at worst C++/C#. Freeware that does this exact requirement would also do the job.

This script/program will run on Windows XP with .NET 2.0 SP1.

link|improve this question
If the machine isn't designed for hot-swapping then it may not be safe to hot-swap the drive. – Douglas Leeder Mar 3 '10 at 16:17
I think this should belong to serverfault.com – t0mm13b Mar 3 '10 at 16:20
3  
First and foremost: this can only be done with hard-drive interfaces that support hot-swapping (like SATA). A "regular" PATA IDE hard-drive cannot and should not be hot-swapped - due to the way this hardware and related hardware (like the Motherboard's PATA IDE controller) initializes and works. – M.A. Hanin Mar 3 '10 at 16:22
Thank you for that. :) The hard drives are using SATA. – Brandon Mar 3 '10 at 16:26
feedback

migrated from stackoverflow.com Mar 4 '10 at 8:31

This question came from our site for professional and enthusiast programmers.

2 Answers

M.A. Hanin is correct, once the drive is unmounted it's simply a case as to whether or not the drive, controller and power supply were designed to allow for removal.

link|improve this answer
feedback

I believe SATA 2 supports hot-swap natively. All you need is to buy a hot-swap kit. So a google search on "SATA 2 hot swap enclosure" will give you plenty of choice.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown