Hail Vaguers!

I'm hoping someone(s) here in the group may be able to provide a tip on
a situation that's been vexing me for some time.

On someone's recommendation (who will remain nameless) I went an purchased
 a Seagate FreeAgent USB drive that I'd toss out in a heartbeat if
I could (but can't). There is a known 'spindown' issue w/this drive
that manifests itself in both RH and Ubuntu systems
that causes it to stop working. The fix entails
setting allow_restart to 1 in  /sys/class/scsi_disk/{driveID}/

I added a udev rule (see below) that seems to correct the problem somewhat, 
but only after re-booting the OS; and even then, not yet to my complete 
satisfaction. 

That's a PITA and I'll be smacked if i'm going to re-boot just to get my drive 
back up,
just to see how long it'll stay up! The problem does not seem to be Hardy's 
ehci_hcd usb2.0 
but I figured it has to be something in the kernel that I should be able to 
remove|delete
or clear, before (re-)plugging in the USB drive.

At first I tried removing kernel modules and re-loading them, but it
still throws the 'bad superblock' error.

 Also, the drive has LVM on top of
it, which may be problematic by itself; e.g. if the drive was just plain ext3
maybe it would be recognized OK, but LVM compounds the problem. After plugging 
in 
the drive (for the upteenth time) and watching all the right sysmsgs i do:

/sbin/vgscan 
/sbin/lvscan
#then 
/sbin/vgchange -ay
#to activate the vg

result:
  /dev/vg02/xen_store: read failed after 0 of 4096 at 32212189184: Input/output 
error


I'm perplexed and googling gets me nowhere. Is there some place in the system 
where 
latent LVM data is stored that can be cleared? Or, if it's not LVM, is there 
some
location in /sys (or /proc) that I've overlooked?

Any input appreciated an TIA,


Rion


 a more permanent fix is to add a udev rule:
cat /etc/udev/rules.d/50-fix_usb_hd.rules
#RION 2008SEP24
#Notice the ATTRS{model}, specifying the drive model.
SUBSYSTEMS=="scsi", ATTRS{vendor}=="Seagate", ATTRS{model}=="FreeAgentDesktop", 
RUN+="/usr/local/sbin/Seagate-allow-restart.sh  %k"
#You can display the drive's model name (and other drive-specific stuff that 
you could query on) with this command:
#udevinfo --attribute-walk --name=/dev/sdb

>root ['pts/2'] > cat /usr/local/sbin/Seagate-allow-restart.sh 
#!/bin/bash
#RION: below cmds are in root/Scripts/Seagate-restart.sh
#You can display the drive's model name and info with this command:
#udevinfo --attribute-walk --name=/dev/sdb
#check the drive:
#sdparm -al /dev/sdb
# this appears to force the drive to start
#sudo sdparm --command=start /dev/sdb
# and now this command works - clear the drive:
#sdparm --clear STANDBY -6 /dev/sdb

  /usr/bin/logger "RION: /usr/local/sbin/Seagate-allow-restart.sh called from 
etc/udev/rules.d/etc/udev/rules.d/91-fix_usb_hd  "
echo 1 > /sys/class/scsi_disk/$1/allow_restart
#Optionally, below may make some difference
#echo 1024 > /sys/block/sdb/device/max_sectors

-- 
                                     3010 Rte 109
                                     Waterville, VT 05492
                                     email: rion_at_dluz.com
                                     web: http://dluz.com/Rion/
                                     AIM/Jabber/Google: riondluz
                                     Phone: 802.644.2255
                                     http://www.linkedin.com/pub/6/126/769




                        ------
                       ( BSD? )
            .~.  
           ~gnuu.    O  ------
          uGNUGNu   o     
         @g~nu~~gNu      
         G/@||@) N|      
         @,----.GN|      
        GN \__/  gNU    
       gNU        gNUu  
      gNU          gNUu  
     gNU            gNUu
     GNU            GNUU
     GnU            GNUU
   __| \.        |\gNugNu
   |    `.       | `/ \Gn
  _)      \.___.,|     .'
  \____   )GNUGNU|   .'  
       `-'       `--' 
         L I N U X      
Choice of a  GNU Generation      



Did you hear the one about the Microsoft coffee maker?
It makes tea then convinces you that you only ever wanted a tea.
..
Did you hear the one about the Apple coffee maker?
It does an amazing Mocha Frappucino with whipped cream, caramel sauce and a 
chocolate flake in the top 
but doesn't know how to make a plain black coffee.
..
Did you hear the one about the Linux coffee maker?
v0.1 made a good plain coffee but it took a while doing it, v1.0 makes good 
plain coffee 
but there's a patch that allows it to make better tea than the Microsoft coffee 
maker
 and v2.0 gives you a cup of plain coffee, a cup of whipped cream, a cup of 
caramel sauce, 
a chocolate flake in a wrapper and tells you to make the coffee how you want 
but for a much lower price than the Apple one. 
by pandrijeczko (588093) Alter Relationship on Wednesday June 18, @03:50AM 
(#23835763)
http://it.slashdot.org/comments.pl?sid=586835&cid=23835763

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to