LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-02-2011, 11:45 AM   #1
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Rep: Reputation: 39
external hard disk sleeps but never wakes up


hello everyone,
I have an external disk connected to a file server.
while the disk remains idle it goes to sleep.
once I want access something though the drive will not powerup again.
I have to unplug and plugin again the cable.

The problem repeats itself whether i connect the drive through firewire, usb or e-sata ports.

It is rather well known case and considered a bug in several cases:

https://bugzilla.redhat.com/show_bug.cgi?id=480389
https://bugzilla.redhat.com/show_bug.cgi?id=433287
http://serverfault.com/questions/937...up-when-needed

supposedly the problem was resolved after the 2.6.24 kernel, but i'm still having problems with a 2.6.28.6 kernel (slack11)

anyone got any experience to share with this?

Thank you
 
Old 12-03-2011, 03:07 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Does this workaround work for you? If not, it's a different bug. If so, the Slack kernel you're using probably doesn't have the patch.
 
Old 12-03-2011, 07:17 PM   #3
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
i've set my udev similar to the workaround you mentioned macemoneta.
since its a firewire drive connected here,

i first checked using udevinfo (now udevadm) where the disk is located under /sys.

found that is exists in several places
(/sys/bus/ieee1394 , or /sys/bus/scsi/ , or /sys/class/scsi_disk , or /sys/block ....

in the end i device to used the 2nd way (/sys/bus/scsi/) and the disk is located at:

root@slack11:~# udevinfo -a -p /sys/bus/scsi/devices/8\:0\:0\:0

Quote:
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/devices/pci0000:00/0000:00:1e.0/0000:05:06.0/fw-host0/0090a9d19a8029f2/0090a9d19a8029f2-0/host8/target8:0:0/8:0:0:0':
KERNEL=="8:0:0:0"
SUBSYSTEM=="scsi"
DRIVER=="sd"
SYSFS{device_blocked}=="0"
SYSFS{type}=="0"
SYSFS{scsi_level}=="5"
SYSFS{vendor}=="WD "
SYSFS{model}=="My Book "

SYSFS{rev}=="1028"
SYSFS{state}=="running"
SYSFS{timeout}=="30"
SYSFS{iocounterbits}=="32"
SYSFS{iorequest_cnt}=="0x1df"
SYSFS{iodone_cnt}=="0x1df"
SYSFS{ioerr_cnt}=="0x3"
SYSFS{modalias}=="scsi:t-0x00"
SYSFS{evt_media_change}=="0"
SYSFS{queue_depth}=="1"
SYSFS{queue_type}=="none"
SYSFS{ieee1394_id}=="0090a9d19a8029f2:0:0"

looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:06.0/fw-host0/0090a9d19a8029f2/0090a9d19a8029f2-0/host8/target8:0:0':
ID=="target8:0:0"
BUS==""
DRIVER==""
SYSFS{uevent}==""

looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:06.0/fw-host0/0090a9d19a8029f2/0090a9d19a8029f2-0/host8':
ID=="host8"
BUS==""
DRIVER==""
SYSFS{uevent}==""

looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:06.0/fw-host0/0090a9d19a8029f2/0090a9d19a8029f2-0':
ID=="0090a9d19a8029f2-0"
BUS=="ieee1394"
DRIVER=="sbp2"

SYSFS{address}=="0x0000fffff0000434"
SYSFS{length}=="0"
SYSFS{ignore_driver}=="0"
SYSFS{specifier_id}=="0x00609e"
SYSFS{version}=="0x010483"
SYSFS{model_id}=="0x001102"
SYSFS{model_name_kv}=="My Book"

looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:06.0/fw-host0/0090a9d19a8029f2':
ID=="0090a9d19a8029f2"
BUS=="ieee1394"
DRIVER==""
SYSFS{uevent}=="PHYSDEVBUS=ieee1394"
SYSFS{guid}=="0x0090a9d19a8029f2"
SYSFS{guid_vendor_id}=="0x0090a9"
SYSFS{capabilities}=="0x0083c0"
SYSFS{vendor_id}=="0x0090a9"
SYSFS{nodeid}=="0xffc0"
SYSFS{bus_options}=="IRMC_0_ CMC_0_ ISC_0_ BMC_0_ PMC_0_ GEN_1_ LSPD_3_ MAX_REC_64_ MAX_ROM_1_ CYC_CLK_ACC_255_"
SYSFS{vendor_name_kv}=="WD"

looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:06.0/fw-host0':
ID=="fw-host0"
BUS=="ieee1394"
DRIVER=="nodemgr"
SYSFS{node_count}=="2"
SYSFS{selfid_count}=="2"
SYSFS{nodes_active}=="2"
SYSFS{in_bus_reset}=="0"
SYSFS{is_root}=="1"
SYSFS{is_cycmst}=="1"
SYSFS{is_irm}=="1"
SYSFS{is_busmgr}=="0"

looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:06.0':
ID=="0000:05:06.0"
BUS=="pci"
DRIVER=="ohci1394"
SYSFS{vendor}=="0x104c"
SYSFS{device}=="0x8024"
SYSFS{subsystem_vendor}=="0x1458"
SYSFS{subsystem_device}=="0x1000"
SYSFS{class}=="0x0c0010"
SYSFS{irq}=="18"
SYSFS{local_cpus}=="3"
SYSFS{local_cpulist}=="0-1"
SYSFS{modalias}=="pci:v0000104Cd00008024sv00001458sd00001000bc0Csc00i10"
SYSFS{enable}=="1"
SYSFS{broken_parity_status}=="0"
SYSFS{msi_bus}==""

looking at parent device '/devices/pci0000:00/0000:00:1e.0':
ID=="0000:00:1e.0"
BUS=="pci"
DRIVER==""
SYSFS{vendor}=="0x8086"
SYSFS{device}=="0x244e"
SYSFS{subsystem_vendor}=="0x0000"
SYSFS{subsystem_device}=="0x0000"
SYSFS{class}=="0x060401"
SYSFS{irq}=="0"
SYSFS{local_cpus}=="3"
SYSFS{local_cpulist}=="0-1"
SYSFS{modalias}=="pci:v00008086d0000244Esv00000000sd00000000bc06sc04i01"
SYSFS{enable}=="1"
SYSFS{broken_parity_status}=="0"
SYSFS{msi_bus}=="1"

looking at parent device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""
SYSFS{uevent}==""
from all that, i used the bolded ones to create udev rule:

Quote:
ACTION=="add", \
SUBSYSTEM=="scsi", DRIVER=="sd" \
SUBSYSTEMS=="ieee1394", DRIVERS=="sbp2", \
RUN+="/bin/sh -c 'echo 1 >/sys/class/scsi_disk/%k/allow_restart'"
I hope I did it right.

oddly enough, before writing the udev rule, I chekced the '/sys/class/scsi_disk/%k/allow_restart' that is stated in the workaround. It values was 1... so i'm afraid the tweak will not work...

still i'll keep my hopes up till tomorrow morning..

thank you for your help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] changing GRUB from an external hard disk to the internal hard disk of my lap eco123 Linux - Newbie 2 05-15-2010 12:20 PM
Copy of IBM Server hard disk data to Another USB External Hard disk mazharcdn Linux - Server 2 09-02-2009 12:41 AM
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration