Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Jul 16 '11 at 14:49

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

up vote 0 down vote accepted

after trying some things out i found that the /sys/bus/usb/devices/1-4/1-4:1.0/host3/power/level file actually did not exist.

the correct file was actually located at /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/power/level which is far more logical - just add a /sys to the start of the output from the udevadm info -q path -n /dev/sdc1 command.

echoing suspend to this file will suspend the external hard drive - all the lights go off and it uses low power.

then echoing on to the same location will wake it up again!

now i can leave all my drives plugged in to my lan pc and suspend them until i want to use them :)

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.