Re: USB external hard drive disconnecting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reid Rivenburgh wrote:
Hi.  I bought an external USB hard drive last week and reformatted it
as ext3.  I can mount it and read/write files, but for some reason it
periodically disconnects and reconnects.  I would like to use it as
permanent storage, hooked up to my computer all the time.  I added a
label to it and put a line in fstab to mount it.  But I'm getting
lines like these in my /var/log/messages:

Feb  5 00:07:05 pigpen kernel: usb 1-7: USB disconnect, address 4
Feb  5 00:07:06 pigpen kernel: scsi 2:0:0:0: rejecting I/O to dead device
Feb  5 00:07:06 pigpen kernel: EXT3-fs error (device sdd1):
ext3_find_entry: reading directory #2 offset 0
Feb  5 00:07:06 pigpen kernel: scsi 2:0:0:0: rejecting I/O to dead device
(and more...)

It's then quickly found again, though assigned sde1 in this case and
of course not automatically mounted.  I'm assuming the filesystem also
requires an e2fsck because it was disconnected.

Does anyone know what might be causing this?  Is it likely a hardware
issue?  I have another external drive that I've been using without
problems for about a year, but it's firewire.  Previously, I was using
both drives with autofs, but the new drive had some problems with that
approach, too.  (Now that I've learned about filesystem labels, that
seems like the way to go anyway.)

I apologize for missing this earlier, if this is a FreeAgent or similar drive, the drive goes to sleep, the interface shuts down, and comes back up with part as USB 1.1 and part as 2.0 (I may be describing this poorly, it's been a while). Anyway, help is here, plug in the drive and run the attached script (if the mailer doesn't eat it). If the drive plugs in as sdf (mine does) run "FixFreeAgent sdf" and the problem should go away.

I'm running F8 with all updates (kernel-2.6.23.14-107.fc8).

Thanks,
reid



--
Bill Davidsen <davidsen@xxxxxxx>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
#!/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@xxxxxxx
# 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 -xv <<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

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux