Bug 16070
Summary: | Fail to issue Start/Stop Unit | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | Ian Dall (ian) |
Component: | SCSI | Assignee: | linux-scsi (linux-scsi) |
Status: | RESOLVED DOCUMENTED | ||
Severity: | normal | CC: | alan |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.34-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Ian Dall
2010-05-28 14:55:24 UTC
Reply-To: dgilbert@interlog.com On 10-05-28 10:55 AM, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=16070 > > Summary: Fail to issue Start/Stop Unit > Product: IO/Storage > Version: 2.5 > Kernel Version: 2.6.34-rc5 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: SCSI > AssignedTo: linux-scsi@vger.kernel.org > ReportedBy: ian@beware.dropbear.id.au > Regression: No > > > I am attempting to save power by spinning down idle scsi disks. These are old > fashioned parallel (U320) disks on a SCSI storage controller: LSI Logic / > Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 07). > > I do: > > sg_start --stop /dev/sde > echo 0xfffffff> /sys/module/scsi_mod/parameters/scsi_logging_level > dd if=/dev/sde of=/dev/null count=1 > sleep 10 > echo 0> /sys/module/scsi_mod/parameters/scsi_logging_level > > I get: > dd: reading `/dev/sde': Input/output error > 0+0 records in > 0+0 records out > 0 bytes (0 B) copied, 0.00536828 s, 0.0 kB/s > > If I manually spin up the disk with sg_start --start /dev/sde, then things > work > again as expected. <snip> > > After getting: "Add. Sense: Logical unit not ready, initializing command > required" I would expect a Start/Stop unit command, but it appears that none > is > ever issued. There is a different design philosophy between SCSI and ATA disks (and has been for a very long time) reflecting their different markets. When a SCSI disk is spun down, then it will return errors on any command trying to do IO until a SCSI START STOP UNIT command (start) is sent and then time is allowed for the disk to spin up. What you report as a bug is the long standing behaviour of SCSI disks which Linux has not tried to modify. Doug Gilbert Reply-To: brking@linux.vnet.ibm.com On 05/28/2010 10:20 AM, Douglas Gilbert wrote: > On 10-05-28 10:55 AM, bugzilla-daemon@bugzilla.kernel.org wrote: >> https://bugzilla.kernel.org/show_bug.cgi?id=16070 >> >> Summary: Fail to issue Start/Stop Unit >> Product: IO/Storage >> Version: 2.5 >> Kernel Version: 2.6.34-rc5 >> Platform: All >> OS/Version: Linux >> Tree: Mainline >> Status: NEW >> Severity: normal >> Priority: P1 >> Component: SCSI >> AssignedTo: linux-scsi@vger.kernel.org >> ReportedBy: ian@beware.dropbear.id.au >> Regression: No >> >> >> I am attempting to save power by spinning down idle scsi disks. These >> are old >> fashioned parallel (U320) disks on a SCSI storage controller: LSI Logic / >> Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 07). >> >> I do: >> >> sg_start --stop /dev/sde >> echo 0xfffffff> /sys/module/scsi_mod/parameters/scsi_logging_level >> dd if=/dev/sde of=/dev/null count=1 >> sleep 10 >> echo 0> /sys/module/scsi_mod/parameters/scsi_logging_level >> >> I get: >> dd: reading `/dev/sde': Input/output error >> 0+0 records in >> 0+0 records out >> 0 bytes (0 B) copied, 0.00536828 s, 0.0 kB/s >> >> If I manually spin up the disk with sg_start --start /dev/sde, then >> things work >> again as expected. > > <snip> >> >> After getting: "Add. Sense: Logical unit not ready, initializing command >> required" I would expect a Start/Stop unit command, but it appears >> that none is >> ever issued. > > There is a different design philosophy between SCSI and > ATA disks (and has been for a very long time) reflecting > their different markets. When a SCSI disk is spun down, then > it will return errors on any command trying to do IO > until a SCSI START STOP UNIT command (start) is sent and then > time is allowed for the disk to spin up. > > What you report as a bug is the long standing behaviour of > SCSI disks which Linux has not tried to modify. If you set the allow_restart sysfs parameter on the disk, it should automatically spin up the disk when scsi eh sees that sense data. Thanks, Brian Ah, thanks. That works perfectly! I knew that traditionally this wasn't supported in linux (as per comment #1) but I also understood that the functionality had been added in recent kernels. In my defence, I can't find any reference to this in "man sd' nor with "grep allow_restart Documentation/scsi/*". Can this be treated as a documentation bug? |