Preventing an external hard drive from idling on ubuntu

I got a Seagate FreeAgent Pro external hard drive for backups (JWZ has a very straightforward article about this). It happily reformatted to ext3, and I kicked off an rsync of /home.

Because rsync figures out what files need copying before it copies them, and there are hundreds of thousands of files in my /home, there was more than a couple minutes of grinding on the local hard drive building a list of files to copy over. While this happened, the external drive idled into a “sleep” mode that ubuntu can’t seem to awaken it from.

This was slashdotted with an sdparm hack, but I believe this solution is better. Copy this new udev rule into /etc/udev/rules.d/50-local.rules (this is a new file that you will be creating):

# Seagate FreeAgent allow_restart fix (i/o errors)
SUBSYSTEMS=="scsi",DRIVERS=="sd",ATTRS{vendor}=="Seagate*",ATTRS{model}=="FreeAgent*",RUN+="/bin/sh -c 'echo 1 > /sys/class/scsi_disk/%k/allow_restart'"

Related posts:

  1. 50,000 photos in iPhoto on a shared laptop and external drive
    I’ve got over 100GiB of photos (JPEG and RAW) taken over the years, and they don’t comfortably fit on a laptop. The laptop is also shared by everyone in my......
  2. Importing a local CVS repository into git on ubuntu
    Every post I found in the googles referenced pserver (CVS’s clear-text socket-server protocol) when importing a CVS repository. Until I found this. Huzzah. So I wanted to import a local......
  3. Make “ps -ef” work in a shell on Mac OS X
    If you’re used to SunOS or BSD, you’ll be at home with Mac OS X’s “ps -aux” to get a process list from a shell prompt. If you’ve been using......
  4. Installing CrashPlan on Ubuntu 9.04 Server Edition
    Although rsnapshot is super for linux-to-linux backups, I’ve found CrashPlan to work very well as a backup solution for my family’s windows and mac boxes. The CrashPlan installation works pretty......

This entry was posted in Technical HOWTOs and tagged , , . Bookmark the permalink.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Additional comments powered by BackType