* [sbp2] external hard disk shutdown timer
@ 2006-08-07 21:05 olecom
2006-08-07 23:55 ` Douglas Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: olecom @ 2006-08-07 21:05 UTC (permalink / raw)
To: Linux SCSI
Hallo ! Let me ask a question.
I couldn't change some values (f.e IDLE or ICT), while its
"changing" flag is "y".
Would you like to explain meaning of that flag and, possibly,
why change doesn't apply ? Maybe i'm doing or understanding
something wrong ?
All i want is to switch off timers (AFAIR from spcecs i've found t10.org),
that shutdown ieee1394/usb-storage external HDD.
TIA.
deen:/home/olecom# sdparm --set=IDLE=0 -6 /dev/sda
/dev/sda: WD 2500JB External 2.23 [simplified direct access device]
Request sense detected: Sense key: Blank Check
ASC=55, ASCQ=55
continuing ...
deen:/home/olecom# sdparm -p po -6 /dev/sda
/dev/sda: WD 2500JB External 2.23 [simplified direct access device]
Request sense detected: Sense key: Medium Error
ASC=55, ASCQ=55
continuing ...
Power condition mode page:
>>> warning: mode page seems malformed, try '--flexible'
IDLE 1 [cha: y, def: 1, sav: 1]
STANDBY 0 [cha: n, def: 0, sav: 0]
ICT 4095 [cha: y, def:4095, sav:4095]
SCT 4278190080 [cha: y, def:4278190080, sav:4278190080]
deen:/home/olecom#
--
-o--=O`C
#oo'L O
<___=E M
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sbp2] external hard disk shutdown timer
2006-08-07 21:05 [sbp2] external hard disk shutdown timer olecom
@ 2006-08-07 23:55 ` Douglas Gilbert
2006-08-08 8:04 ` Stefan Richter
0 siblings, 1 reply; 5+ messages in thread
From: Douglas Gilbert @ 2006-08-07 23:55 UTC (permalink / raw)
To: olecom; +Cc: Linux SCSI
olecom@mail.ru wrote:
> Hallo ! Let me ask a question.
>
> I couldn't change some values (f.e IDLE or ICT), while its
> "changing" flag is "y".
I would be surprised if you could change IDLE or
ICT on a SCSI disk and even more surprised if
that could be done through a bridge to an ATA
disk (as is happening in your case).
What the SAT draft is doing is instructive here. It
maps the SBC "stop" state (as in when START STOP UNIT
with start=0 is sent to a disk) to the ATA "standby"
state. Further, the SAT layer bounces subsequent media
access command (e.g. READ) and sends back a NOT READY
sense key with a asc of "initializing command required ...".
Actually if that READ had got through to the ATA disk
(e.g. sent as an ATA READ via the ATA PASS THROUGH SCSI
command) then the ATA disk would have spun up! However
a design goal of SAT is to make an ATA disk look like
a SCSI disk which once spun down need a START STOP UNIT
(start=1) command prior to subsequent media access.
And that is about it. Does anyone know of SCSI disks
that implement the power condition mode page with real
changeable fields? Also what does "idle" state mean for
a disk? [Heads parked, media spinning?]
Further, the SAT draft only outlines the partial
translation of 4 mode pages:
- caching
- control
- informational exceptions control
- read write error recovery
Notice no power condition mode page. I'm not familiar
enough with the SBP-2 standard and the corresponding
sbp2 driver but I doubt whether that mode page is
really supported. Alternatively it could be the SCSI
to ATA protocol bridge software being unhelpful.
> Would you like to explain meaning of that flag and, possibly,
> why change doesn't apply ? Maybe i'm doing or understanding
> something wrong ?
I just think trying to manipulate mode pages
for ATA devices via the current and previous
generations of USB mass storage and 1392 sbp2
chips is a lost cause. Hopefully the next
generation will have a SAT standard to guide them.
> All i want is to switch off timers (AFAIR from spcecs i've found t10.org),
> that shutdown ieee1394/usb-storage external HDD.
>
> TIA.
>
> deen:/home/olecom# sdparm --set=IDLE=0 -6 /dev/sda
> /dev/sda: WD 2500JB External 2.23 [simplified direct access device]
> Request sense detected: Sense key: Blank Check
> ASC=55, ASCQ=55
> continuing ...
Not a good start. The REQUEST SENSE ** seems to get a wild
sense key and an unknown asc/ascq combination.
> deen:/home/olecom# sdparm -p po -6 /dev/sda
> /dev/sda: WD 2500JB External 2.23 [simplified direct access device]
> Request sense detected: Sense key: Medium Error
> ASC=55, ASCQ=55
It is not normal to get a Medium Error when accessing mode
pages. [If the disk did store mode information on the media
and could not read it, then it would probably fail its
initial self test.]
> continuing ...
> Power condition mode page:
> >>> warning: mode page seems malformed, try '--flexible'
hmm, 'malformed'
> IDLE 1 [cha: y, def: 1, sav: 1]
> STANDBY 0 [cha: n, def: 0, sav: 0]
> ICT 4095 [cha: y, def:4095, sav:4095]
> SCT 4278190080 [cha: y, def:4278190080, sav:4278190080]
the SCT is 0xff000000 .
> deen:/home/olecom#
Looks like garbage in, garbage out.
Lots of error paths were checked and nothing
died badly which indicates various drivers
are working well, so that is good.
** the initial REQUEST SENSE command used in
sdparm-0.98 has been removed in sdparm-0.99
because it broke broken software. Sadly the
major problem was with libata which doesn't
support REQUEST SENSE. If other see sdparm
version 0.98 failing on a REQUEST SENSE, please
upgrade to version 0.99 .
Doug Gilbert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sbp2] external hard disk shutdown timer
2006-08-07 23:55 ` Douglas Gilbert
@ 2006-08-08 8:04 ` Stefan Richter
2006-08-08 15:27 ` Douglas Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Richter @ 2006-08-08 8:04 UTC (permalink / raw)
To: dougg; +Cc: olecom, Linux SCSI
Douglas Gilbert wrote:
> olecom@mail.ru wrote:
>> Hallo ! Let me ask a question.
>>
>> I couldn't change some values (f.e IDLE or ICT), while its
>> "changing" flag is "y".
>
> I would be surprised if you could change IDLE or
> ICT on a SCSI disk and even more surprised if
> that could be done through a bridge to an ATA
> disk (as is happening in your case).
>
> What the SAT draft is doing is instructive here. It
> maps the SBC "stop" state (as in when START STOP UNIT
> with start=0 is sent to a disk) to the ATA "standby"
> state.
[...]
> Further, the SAT draft only outlines the partial
> translation of 4 mode pages:
> - caching
> - control
> - informational exceptions control
> - read write error recovery
>
> Notice no power condition mode page. I'm not familiar
> enough with the SBP-2 standard and the corresponding
> sbp2 driver but I doubt whether that mode page is
> really supported. Alternatively it could be the SCSI
> to ATA protocol bridge software being unhelpful.
I think RBC and SBC are more relevant than SBP-2 in this case. SBP-2
doesn't specify supported commands and mode parameters.
And then there is also a Power Management specification issued by the
1394-TA as a companion to IEEE 1394(a,b) but I doubt that it is
implemented by most of current desktop hardware/firmware/software.
Mac OS X is known to spin down (many) SBP-2 HDDs on certain occasions,
notably when devices are "ejected" i.e. prepared by the Mac OS Finder to
disconnect. My guess is Mac OS uses START STOP UNIT (with whatever
parameters). I should test this some day.
Also, some SBP-2 bridges "sense" when the host PC is powered off or put
into a suspended mode and switch the HDD off. Some other SBP-2 bridges
spin HDDs down after an idle timeout which appears to be a fixed value
in the firmware. A few of these firmwares are able to transparently spin
the HDD back up again on next access, others require START STOP UNIT
with start=1 to spin up. So, power management of available SBP-2
products is quite heterogeneous AFAI have seen and read. These automatic
features are not standardized by SBP-2 or IEEE 1394(a,b).
>> Would you like to explain meaning of that flag and, possibly,
>> why change doesn't apply ? Maybe i'm doing or understanding
>> something wrong ?
>
> I just think trying to manipulate mode pages
> for ATA devices via the current and previous
> generations of USB mass storage and 1392 sbp2
> chips is a lost cause. Hopefully the next
> generation will have a SAT standard to guide them.
Even reading mode pages via MODE SENSE is not properly (let alone
extensively) implemented by many current SBP-2 bridges.
Oleg mentioned in another post that this is an Initio bridge. These
bridges are known to return bogus mode page headers on MODE SENSE, so I
am not very surprised about the following sense keys after REQUEST SENSE.
>> All i want is to switch off timers (AFAIR from spcecs i've found t10.org),
>> that shutdown ieee1394/usb-storage external HDD.
>>
>> TIA.
>>
>> deen:/home/olecom# sdparm --set=IDLE=0 -6 /dev/sda
>> /dev/sda: WD 2500JB External 2.23 [simplified direct access device]
AFAIK all Initio bridges show Peripheral Device Type 0x00 (SBC disk/
direct access device) in their INQUIRY data if HDDs are connected, not
device type 0x0E (RBC disk/ simplified direct access device) like by far
most SBP-2 HDDs. It is not clear to me whether Initio's firmwares
actually implement SBC or RBC.
How does sdparm determine the Peripheral Device Type?
>> Request sense detected: Sense key: Blank Check
>> ASC=55, ASCQ=55
>> continuing ...
>
> Not a good start. The REQUEST SENSE ** seems to get a wild
> sense key and an unknown asc/ascq combination.
Yes, sense key "Blank Check" and ASC/ASCQ 0x55/0x55 seem rather random.
The sbp2 driver has to convert sense data from the SBP-2 status block
but I hope (and experience agrees with) that sbp2 does this properly and
the mistake happens in the firmware here.
>> deen:/home/olecom# sdparm -p po -6 /dev/sda
>> /dev/sda: WD 2500JB External 2.23 [simplified direct access device]
>> Request sense detected: Sense key: Medium Error
>> ASC=55, ASCQ=55
>
> It is not normal to get a Medium Error when accessing mode
> pages. [If the disk did store mode information on the media
> and could not read it, then it would probably fail its
> initial self test.]
>
>> continuing ...
>> Power condition mode page:
>> >>> warning: mode page seems malformed, try '--flexible'
>
> hmm, 'malformed'
>
>> IDLE 1 [cha: y, def: 1, sav: 1]
>> STANDBY 0 [cha: n, def: 0, sav: 0]
>> ICT 4095 [cha: y, def:4095, sav:4095]
>> SCT 4278190080 [cha: y, def:4278190080, sav:4278190080]
>
> the SCT is 0xff000000 .
i.e. 4952 days if I calculate correctly --- may be random data or
shifted bytes of the mode page or a data from a different mode page than
requested.
>> deen:/home/olecom#
>
> Looks like garbage in, garbage out.
>
> Lots of error paths were checked and nothing
> died badly which indicates various drivers
> are working well, so that is good.
>
>
> ** the initial REQUEST SENSE command used in
> sdparm-0.98 has been removed in sdparm-0.99
> because it broke broken software. Sadly the
> major problem was with libata which doesn't
> support REQUEST SENSE. If other see sdparm
> version 0.98 failing on a REQUEST SENSE, please
> upgrade to version 0.99 .
>
> Doug Gilbert
--
Stefan Richter
-=====-=-==- =--- -=---
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sbp2] external hard disk shutdown timer
2006-08-08 8:04 ` Stefan Richter
@ 2006-08-08 15:27 ` Douglas Gilbert
0 siblings, 0 replies; 5+ messages in thread
From: Douglas Gilbert @ 2006-08-08 15:27 UTC (permalink / raw)
To: Stefan Richter; +Cc: olecom, Linux SCSI
Stefan Richter wrote:
> Douglas Gilbert wrote:
>> olecom@mail.ru wrote:
>>> Hallo ! Let me ask a question.
>>>
>>> I couldn't change some values (f.e IDLE or ICT), while its
>>> "changing" flag is "y".
>> I would be surprised if you could change IDLE or
>> ICT on a SCSI disk and even more surprised if
>> that could be done through a bridge to an ATA
>> disk (as is happening in your case).
It seems that <olecom@mail.ru> hopes the the SCSI "idle"
power condition will map to the ATA STANDBY command
(as the ATA IDLE command action looks pretty vague).
I'm not sure SCSI disk vendors want to use "idle" and
"standby" states, or at least don't want them externally
manipulated. They design their disks for 24x7 access
and have lower "start stop cycle" spec-ed counts over
the device lifetime than ATA units.
The design of SAT seems to be when it is not emulating
typically SCSI disk behaviour, then it says nothing;
leaving the "extras" to the ATA PASS THROUGH SCSI
commands.
So hopefully those 1394 and usb scsi to ata bridges
will soon implement those ATA PASS THROUGH SCSI
commands. Then tools like hdparm and smartmontools
can work with ATA disks connected via a non-ata
transport.
<snip>
> Even reading mode pages via MODE SENSE is not properly (let alone
> extensively) implemented by many current SBP-2 bridges.
>
> Oleg mentioned in another post that this is an Initio bridge. These
> bridges are known to return bogus mode page headers on MODE SENSE, so I
> am not very surprised about the following sense keys after REQUEST SENSE.
>
>>> All i want is to switch off timers (AFAIR from spcecs i've found t10.org),
>>> that shutdown ieee1394/usb-storage external HDD.
>>>
>>> TIA.
>>>
>>> deen:/home/olecom# sdparm --set=IDLE=0 -6 /dev/sda
>>> /dev/sda: WD 2500JB External 2.23 [simplified direct access device]
>
> AFAIK all Initio bridges show Peripheral Device Type 0x00 (SBC disk/
> direct access device) in their INQUIRY data if HDDs are connected, not
> device type 0x0E (RBC disk/ simplified direct access device) like by far
> most SBP-2 HDDs. It is not clear to me whether Initio's firmwares
> actually implement SBC or RBC.
>
> How does sdparm determine the Peripheral Device Type?
A standard INQUIRY response. Adding a few '-v' options to sdparm will
show what it is doing.
Doug Gilbert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sbp2] external hard disk shutdown timer
@ 2006-08-08 17:31 olecom
0 siblings, 0 replies; 5+ messages in thread
From: olecom @ 2006-08-08 17:31 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: Stefan Richter, Linux SCSI
Date: Tue, 08 Aug 2006 11:27:12 -0400
Subject: Re: [sbp2] external hard disk shutdown timer
>
> Stefan Richter wrote:
> > Douglas Gilbert wrote:
> >> olecom@mail.ru wrote:
> >>> Hallo ! Let me ask a question.
> >>>
> >>> I couldn't change some values (f.e IDLE or ICT), while its
> >>> "changing" flag is "y".
> >> I would be surprised if you could change IDLE or
> >> ICT on a SCSI disk and even more surprised if
> >> that could be done through a bridge to an ATA
> >> disk (as is happening in your case).
>
> It seems that <olecom@mail.ru> hopes the the SCSI "idle"
> power condition will map to the ATA STANDBY command
> (as the ATA IDLE command action looks pretty vague).
>
I didn't hope on anything, actually, but wanted to find in t10's specs,
what i saw in sdparm output.
In "SCSI Primary Commands - 2 (SPC-2): 8.3.9 Power condition page"
<http://t10.org/ftp/t10/drafts/spc2/spc2r20.pdf> page 204
i've found that matched what i wanted: IDLE and STANDBY timers in 1Ah table.
It seemed OK to me with that i saw in sdparm.
Anyway thank you, guys, i wish you keep good work done well !
P.S.
Finally it was like "wake up, Neo" for me. Why i don't use "standard flow"
to do things ? I mean load wiXP, ask WD support ? From WD's FAQ:
,-
|- Question
| Do Western Digital external hard drives spin down after a certain amount
| of inactivity time? How can I disable this feature?
|- Answer
| The external hard drives listed below will spin down (enter into power saver mode)
| after 10 minutes of drive inactivity. Once the drive is accessed again, the drive
| will exit from the power saver mode and spin back up.
|
| Please Note: This is a permanent feature of the external hard drives and cannot
| be disabled.
`-
Finita.
So, Douglas, this one isn't for 24x7 at all. But i think 250GB just for backup isn't
good, thus 10 minutes is a very short time interval. So, i need something like
'dd count=1 </dev/ext-wd' every 9 minutes in cron :-)
--
-o--=O`C
#oo'L O
<___=E M
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-08 17:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-07 21:05 [sbp2] external hard disk shutdown timer olecom
2006-08-07 23:55 ` Douglas Gilbert
2006-08-08 8:04 ` Stefan Richter
2006-08-08 15:27 ` Douglas Gilbert
-- strict thread matches above, loose matches on Subject: below --
2006-08-08 17:31 olecom
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.