Our backup script mounts an USB hard drive, copies some files, then unmounts. So, since the drive is only in use during this period, I thought it would be good to power down the drive once the backup is complete. Is there a command to do this? If yes, would I need to manually power it back up again when I need to use it next time?
|
show 1 more comment
feedback
|
|
Use this script. This script is designed to properly put an USB device into suspend mode that can then be unplugged safely. But the ultimate effect is what you want to achieve. Find some discussion about the similar topic here. | |||
|
feedback
|
|
I've never seen a USB hard drive that manages power anywhere other than a power switch or the cord itself. If it were a NAS it may be possible to send commands to the underlying OS to shut it down (or suspend) and possibly send it WakeOnLan commands. | |||||||||||
feedback
|
sg_start --stop /dev/sdcbut unfortunately the damn thing just starts it's self back up again! – nbolton Oct 27 '10 at 21:43hal-disable-polling --device /dev/sdcorudisks --inhibit-polling /dev/sdcmay help. – ephemient Oct 27 '10 at 23:19