Bug 553039
Summary: | sg_start --stop does not spin down external USB drive | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Burchell <martinburchell+bug> | ||||
Component: | sg3_utils | Assignee: | Dan Horák <dan> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 11 | CC: | anton, dan, dougsland, gansalmon, itamar, kernel-maint, pknirsch | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-04-16 06:51:00 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: | |||||||
Attachments: |
|
Description
Martin Burchell
2010-01-06 21:58:03 UTC
There is no change in sg_start between Fedora 10 and 11. As you write the drive is spined down and then spins up again, I would expect sg_start works, but something else is causing the spin up (kernel?). Are all partitions from the drive unmounted before running sg_start? Are you running it from a graphical desktop environment or console? (In reply to comment #1) > There is no change in sg_start between Fedora 10 and 11. As you write the drive > is spined down and then spins up again, I would expect sg_start works, but > something else is causing the spin up (kernel?). Yes, I think you are right. > Are all partitions from the > drive unmounted before running sg_start? Yes > Are you running it from a graphical > desktop environment or console? I get the same problem in both the graphical environment and from the console. So now we should try to find the right component for this bug report. Next step could be to boot the system in single user mode - either boot with 1 or S appended on the "kernel" line in grub or run "telinit 1" from console, and try again. It's also possible to stop almost all running daemons (with "service foo stop" or by killing them). When nothing will run (besides udevd) and the device will be powering up then it should be kernel's fault. Otherwise it will be some of the stopped user space components. (In reply to comment #3) > So now we should try to find the right component for this bug report. Next step > could be to boot the system in single user mode - either boot with 1 or S > appended on the "kernel" line in grub or run "telinit 1" from console, and try > again. Thanks for that suggestion. I booted into single user mode, repeated the sg_start instruction as before and the drive behaves in the same way ie spins down and immediately up again. So if I understand comment#3 correctly, we can file this as a kernel bug. kernel version is kernel-PAE-2.6.30.10-105.fc11.i686, although I've seen the same behaviour with kernel-PAE-2.6.29.4-167.fc11.i686 I think bug #561876 tries to solve same issue with different utility. Thanks for pointing that out. Using that information I've created a patch for sg_start. Created attachment 389195 [details]
Patch to sg_start to open the device readonly for --stop
Limited testing:
sg_start --stop now spins the drive down and it doesn't spin up again.
sg_start --start spins the drive up again.
sg_start in sg3_utils 1.29 (available in rawhide) adds a new option --readonly to workaround the difference between ATA and SCSI devices. See bug #561876 for more details. |