Bug 561876
Summary: | sdparm --command=stop is ineffective | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Pádraig Brady <p> | ||||
Component: | sdparm | Assignee: | Terje Røsten <terje.rosten> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 11 | CC: | dan, terje.rosten | ||||
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 19:50:31 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
Pádraig Brady
2010-02-04 15:44:17 UTC
The patch makes sense to me, but I talk to the author of sdparm before applying. Any news from upstream? yes, we discussed it and it's not so simple due some difference between SCSI and ATA. As a result new command-line switch for opening the device RO is introduced and I have a release candidates of the sdparm/sg3_utils upcoming versions. Could you expand on that a bit. I really hate unnecessary options, but if it needs to be an option fair enough. Could we try RO then fall back to RW for example? Also hdparm sets RO by default, so why exactly is sdparm different. cheers. The long answer from Doug: T10 and T13 have been trying to converge the semantics of START/STOP for some time. Folks from Seagate are driving the effort at T10. My guess is that this problem in some form has bitten them. The executive summary is that START_STOP_UNIT in SCSI is state changing in the sense that after a stop both READ and WRITE will fail (until a start command is sent). However in the ATA world what SAT maps START_STOP_INIT(stop) to will not break subsequent READs and WRITEs, it will just slow the first one down (while it spins up the media). A related problem came up in smartmontools recently along these lines: if a ATA disk (via a SCSI device) is opened RW to collect some metadata then on close it will do a SYNCHRONIZE CACHE which will spin up an ATA disk that had earlier been spun down. Same solution: open the device RO. Since sdparm and sg_start were designed for SCSI devices my preference would be to add a '-r' (and '--readonly') option to open the given device RO. I see the issue. So with the above proposed --readonly option: --command=stop still does nothing on ATA unless it's called. That would need to be documented at least in the stop command section of the man page. What does --command=stop do in the presence of udev and SCSI. Will that also be ineffective? Would it be possible to detect if an ATA device is connected and open RO in that case, thus not requiring the -r option and associated documentation. I think you should discuss it with Doug directly (see http://sg.danny.cz/sg/ for contact info) and as always - patches are welcome. A new upstream release is available, seems like Doug has implemented the solution in comment #5. Could you please test the updated package: http://koji.fedoraproject.org/koji/buildinfo?buildID=167119 and see if that helps? works. thanks. Thanks for the feedback, I have pushed the update to F11, F12 and F13. |