Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

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

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

1  
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
4  
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
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.