linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: "Henry, Andrew" <andrew.henry@logica.com>
Cc: Richard Scobie <richard@sauce.co.nz>,
	"MOgWai46[Saurceful of Secrets]" <street41@gmail.com>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: Western Digital RE3
Date: Thu, 28 May 2009 09:24:12 -0400	[thread overview]
Message-ID: <4A1E907C.5000607@tmr.com> (raw)
In-Reply-To: <3ECBDC05781B3D48ABD520A01ABF2F9B2C77213D8A@SE-EX008.groupinfra.com>

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

Henry, Andrew wrote:
>> I'm told that my script to keep "FreeAgent" USB external drives from
>> doing that also works with similar other drives which want to sleep. I
>> have *not* verified that (having none and no time), but if you want the
>> script to try on your own, I think I posted it here, or could put it up
>> on request.
>>
>> --
>> bill davidsen <davidsen@tmr.com>
>>   CTO TMR Associates, Inc
>>     
>
> That would be great!  I would definitely like to have a script that keeps drives alive.  Can you send it privately (keep the list archive smaller) or put it on the net?
>   

This is the version I posted, I've played with some extra features, but 
since you may want to modify it, simple is best. It's small enough to 
just send.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc

"You are disgraced professional losers. And by the way, give us our money back."
    - Representative Earl Pomeroy,  Democrat of North Dakota
on the A.I.G. executives who were paid bonuses  after a federal bailout.



[-- Attachment #2: FreeAgentFix --]
[-- Type: text/plain, Size: 1265 bytes --]

#!/bin/bash
# FreeAgentFix 1.4 2008-02-17 19:45:13-05 root Stable
#================================================================
# FreeAgentFix - fix "Free Agent" USB drives going off line in Linux
#   Author: davidsen@tmr.com
# Based on discussions in LKML and similar lists
#   brings the drive online
#   clears standby
#   Tells the kernel to allow restart

# sanity check
if [ $# -lt 1 ]; then
  echo "FreeAgentFix v1.4 - keeps \"Free Agent\" drives online in Linux"
  echo
  echo "Usage:"
  echo "  ./FreeAgentFix sdX"
  echo
  echo "Where \"X\" is the drive letter assigned when the drive is connected"
  echo
  echo "Plug in the drive, see what device name is assigned to the drive"
  echo "using \"dmesg | tail -10\" or similar"
  echo "run the script with the drive name only (without /dev/)"
  echo
  echo

  # this should be made executable (chmod +x FreeAgentFix) but if
  # someone sources it, don't mess them up
  fn=${0##*/}
  if [ "$fn" == "FreeAgentFix" ]; then
    exit; else
    return
  fi
fi

disk=$1

bash -v <<XX
# Start the drive
sdparm --command=start /dev/${disk}
# Clear the standby
sdparm --clear STANDBY -6 /dev/${disk}
# Allow restart
cd /sys/block/${disk}/device/scsi_disk*
if [ -f allow_restart ]; then
 echo 1 >allow_restart
fi

  reply	other threads:[~2009-05-28 13:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 14:17 Western Digital RE3 MOgWai46[Saurceful of Secrets]
2009-05-25 19:20 ` Richard Scobie
2009-05-26  7:41   ` Henry, Andrew
2009-05-27 23:29     ` Bill Davidsen
2009-05-28  6:17       ` Henry, Andrew
2009-05-28 13:24         ` Bill Davidsen [this message]
2009-05-28 13:29           ` Bill Davidsen
2009-05-25 21:32 ` Redeeman
2009-05-27  1:24 ` Nifty Fedora Mitch
2009-05-27 13:17   ` Redeeman
  -- strict thread matches above, loose matches on Subject: below --
2009-05-27 15:15 russ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1E907C.5000607@tmr.com \
    --to=davidsen@tmr.com \
    --cc=andrew.henry@logica.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=richard@sauce.co.nz \
    --cc=street41@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).