I'm setting up a Linux machine (Ubuntu 9.10) as a file server on my LAN and want to have a few of my external hard drives attached to it, but not always powered up. I've read that I can suspend USB devices (here and here) and this will power down the device until I want to wake it up later. Since my external drives are hard disks I think this will greatly extend their lifespan!
I want to make sure before I go ahead and run the commands that I'm doing exactly the right thing. I want to suspend the device at /dev/sdc1:
$ udevadm info -q path -n /dev/sdc1
# output: /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host3/target3:0:0/3:0:0:0/block/sdc/sdc1
$ echo suspend > /sys/bus/usb/devices/1-4/1-4:1.0/host3/power/level
Then to turn the device back on:
echo on > /sys/bus/usb/devices/1-4/1-4:1.0/host3/power/level
Can someone confirm that I am writing the 'suspend' command to the correct file? Do I need to unmount the drive before I suspend?