Bug 433287
Summary: | Failing to wake up sleepy usb disk | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Aleksandar Milivojevic <alex> | |
Component: | kernel | Assignee: | Pete Zaitcev <zaitcev> | |
Status: | CLOSED WONTFIX | QA Contact: | Martin Jenner <mjenner> | |
Severity: | medium | Docs Contact: | ||
Priority: | low | |||
Version: | 4.6 | Keywords: | Reopened | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | i386 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 480389 (view as bug list) | Environment: | ||
Last Closed: | 2009-01-16 20:02:49 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: |
Description
Aleksandar Milivojevic
2008-02-18 12:46:49 UTC
After reporting the bug, I found this page: http://osdir.com/ml/linux.kernel.firewire.user/2006-09/msg00008.html It looks like there was a fix for a very similar problem with an IEEE-1394 device in upstream kernel: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e31f59ce593b073ee14241781edfb0637697eeb6 Maybe my USB device needs something similar... Well... two things... bad news and good news. Bad news is that touching an empty file will not prevent disk from spinning down. Good news, fix exists in upstream kernel. The parameter allow_restart needs to be set to one for the device. IMO, this should probably be default for USB/FireWire connected devices, and probably wouldn't hurt if it was default for all devices. As explained on this page: http://www.nslu2-linux.org/wiki/FAQ/DealWithAutoSpinDownOnSeagateFreeAgent Could this feature be backported to RHEL4? Seagate FreeAgent drives are not the only drives affected. I saw reports from people owning Western Digital drives having the same problems with their hard drives spinning down (and it is not possible to disable it on those either). It would be nice if RHEL4 kernel would show some love for our stuborn USB hard drives :-) Instead of waiting if it is possible to backport allow_restart option to 2.6.9 kernel, I've upgraded my box. The fix described at page I quoted seems to work nicely in 2.6.18 kernel. I've created udev rule that says: SUBSYSTEM=="scsi_disk",DRIVER=="sd",SYSFS{vendor}=="Seagate",SYSFS{model}=="FreeAgent Pro",RUN+="/usr/local/bin/freeagent %k" which runs simple "freeagent" script when device is attached: #!/bin/sh echo 1 > /sys/class/scsi_disk/${1}/allow_restart Works perfectly. Still it would be nice if there was solution for folks out there with RHEL4 on their boxes. Apperently, allow_restart=1 is going to become default for all USB storage devices in 2.6.24 kernel. Would be nice if it was default on RHEL4/5. Please be advised, that Bugzilla is not a support tool. It is an Engineering and Community tool. So although all changes to Enterprise Linux go through Bugzilla and Red Hat considers issues directly entered into Bugzilla valuable feedback, there is no SLA around it. If this is a production issue, please report it to your Red Hat Support contact. Thank you. No, it's not a production issue. It's a feedback, and I'll let you decide if it's valuable or not. There's a trivial fix in upstream kernel for this, that sets allow_restart to 1 by default for USB attached storage. I believe the fix was introduced in 2.6.24-rc4. It was just couple of lines of code, and it should be trivial to backport to RHEL5 and possibly to RHEL4 too. I can't find the exact patch right now, but if you guys are interested, I'll try to dig it out. In the meantime (or if you guys decide not to backport kernel fix), I hope that the above user-space workaround for RHEL5 will be helpful to your customers that run into the same problem. Ok, found the upstream patch. It is exactly one line of code: http://git.kernel.org/?p=linux/kernel/git/stable/linux- 2.6.24.y.git;a=commitdiff;h=f09e495df27d80ae77005ddb2e93df18ec24d04a;hp=9e3285dba5cac12d65 6da66fd7d420ff1bc0ecc0 I'm going to close this, since we're folding the discretionary RHEL 4 development after 4.8. What about RHEL 5 (which is also affected) and beyond? For RHEL 5, you're on cc for the bug 480389. I may get it in under the 20% rule, stay tuned. For the beyond, the fix is in Linus' tree, so no problem. |