Spinning down external USB hard drives on Ubuntu 8.10 Intrepid Ibex

So I recently switched to Ubuntu Intrepid Ibex from Fedora 8 for no real good reason. Anyway, I have two external 500GB drives that I use for backup, accessing about once a day or so. I would like for those external USB drives to spin down when I am now using them. How can I get that to happens?

Generally, it looks like you can use the sg3-utils package to do that. First, install the package:

$ sudo apt-get install sg3-utils

To do this right you should probably make sure that your hard drives show up in predictable places. The best way I know to do that is to set a label on the partition, and then it should mount in /media/LABEL. So here is a good article on how to rename external USB hard drives. I saved the script at the URL above as /usr/local/scsi-idle and following along:

$ mount
(note that sdc1 has mostly TV shows, sdd has my other data)
$ sudo umount /dev/sdc1
$ sudo umout /dev/sdd1 
(name both partitions appropriately - one partition per drive)
$ sudo e2label /dev/sdc1 BackupTV
$ sudo e2label /dev/sdd1 BackupData

Then power cycle the drives. Check that they show up as expected:

$ mount
...
/dev/sdc1 on /media/BackupTV type ext3 (rw,nosuid,nodev,uhelper=hal)
/dev/sdd1 on /media/BackupData type ext3 (rw,nosuid,nodev,uhelper=hal)

That looks good to me. I also added to /etc/local.rc

# added by devans to spin down external disks.                                                            
# See http://ubuntuforums.org/showthread.php?t=560958&page=3                                              
# and the related wiki entry https://help.ubuntu.com/community/ExternalDriveStandby                       
# Spin down any external SCSI drives after "X" seconds:                                                   
/usr/local/bin/scsi-idle 900 &

which should take care of that. Just for this first time, I ran it myself: $ sudo /usr/local/bin/scsi-idle 900 &

While that did work ok, it only spun down the hard disks. It did not go the extra step of shutting down the fans on the hard drives, so they are about as noisy as they were before. Still, at least they are spun down now. I set the drives to their “auto” setting, but it looks like that will only kick-in and shut them down when they are unmounted, which I do not want to do.



Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *