Re: [Ips] this list

Ralph Weber <roweber@ieee.org> Mon, 24 January 2011 17:10 UTC

Return-Path: <roweber@ieee.org>
X-Original-To: ips@core3.amsl.com
Delivered-To: ips@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 8762728C0DB for <ips@core3.amsl.com>; Mon, 24 Jan 2011 09:10:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.999
X-Spam-Level:
X-Spam-Status: No, score=-101.999 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_36=0.6, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O3Vo4ss2kEcp for <ips@core3.amsl.com>; Mon, 24 Jan 2011 09:10:04 -0800 (PST)
Received: from vms173013pub.verizon.net (vms173013pub.verizon.net [206.46.173.13]) by core3.amsl.com (Postfix) with ESMTP id 74A6F28C0D9 for <ips@ietf.org>; Mon, 24 Jan 2011 09:10:04 -0800 (PST)
Received: from [192.168.1.2] ([unknown] [71.170.237.40]) by vms173013.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LFJ002RTEH9QGE0@vms173013.mailsrvcs.net> for ips@ietf.org; Mon, 24 Jan 2011 11:12:45 -0600 (CST)
Message-id: <4D3DB311.9080705@ieee.org>
Date: Mon, 24 Jan 2011 11:12:49 -0600
From: Ralph Weber <roweber@ieee.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-version: 1.0
To: ips@ietf.org
References: <20110124133020.GN19602@belle.intranet.vanheusden.com> <7C4DFCE962635144B8FAE8CA11D0BF1E03D7689A49@MX14A.corp.emc.com> <AC32D7C72530234288643DD5F1435D530D97D8B6@RTPMVEXC1-PRD.hq.netapp.com> <20110124162709.GS19602@belle.intranet.vanheusden.com>
In-reply-to: <20110124162709.GS19602@belle.intranet.vanheusden.com>
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7bit
Subject: Re: [Ips] this list
X-BeenThere: ips@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: IP Storage <ips.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ips>, <mailto:ips-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ips>
List-Post: <mailto:ips@ietf.org>
List-Help: <mailto:ips-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ips>, <mailto:ips-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Jan 2011 17:10:05 -0000

Not all CHECK CONDITIONs are created equal.

When the Sense Key is Unit Attention, you are receiving the only
flavor of asynchronous event notification that modern SCSI supports.

If you retry the READ CAPACITY command, it should work.

ON THE OTHER HAND

You are well advised to pay heed to asynchronous event notifications
such as the one shown below. They ALWAYS tell you something unusual
has happened in the device.

In this particular case, a power cycle (or equivalent, an iSCSI login
perhaps) has happened since the last time you received status for
some other SCSI command.

If your driver's work queue has any outstanding commands that are
waiting for status, that status will never come.

If you previously used a MODE SELECT command to change the mode
parameters, you might want to check to see if they are still in
effect (frequently the changes will be gone).

In a nutshell, all the saved state of the device is suspect.

All the best,

.Ralph

On 1/24/2011 10:27 AM, folkert wrote:
> Hi,
>
> The CDB I send is:
> SCSI CDB Read Capacity(10)
>      [LUN: 0x0000]
>      [Command Set:Direct Access Device (0x00) (Using default commandset)]
>      [Response in: 12]
>      Opcode: Read Capacity(10) (0x25)
>      Logical Block Address: 0
>      PMI Flags: 0x00
>          .... ...0 = PMI: Pmi is CLEAR
>      Vendor Unique = 0, NACA = 0, Link = 0
>
> (0x25 for the first byte, the rest 0x00)
>
> the reply is:
> SCSI: SNS Info
>      [LUN: 0x0000]
>      Valid: 0
>      .111 0000 = SNS Error Type: Current Error (0x70)
>      Filemark: 0, EOM: 0, ILI: 0
>      .... 0110 = Sense Key: Unit Attention (0x06)
>      Sense Info: 0x00000000
>      Additional Sense Length: 10
>      Command-Specific Information: 00000000
>      Additional Sense Code+Qualifier: Power On, Reset, Or Bus Device Reset Occurred (0x2900)
>      Field Replaceable Unit Code: 0x00
>      0... .... = SKSV: False
>      Sense Key Specific: 000000
>
> in hex:
> 70 00 06 00 00 00 00 0a 00 00 00 00 29 00 00 00 00 00
>
>
> On Mon, Jan 24, 2011 at 11:09:30AM -0500, Knight, Frederick wrote:
>> On the other hand, it depends on what CHECK CONDITION you are getting.
>>
>> Can you supply the full CDB and full response (all sense data including) - status, sense key, ASC/ASCQ, data (if any).
>>
>> If you are sending a badly formed CDB, they the device is perfectly within its rights to return CHECK CONDITION - but when it does, it should also return more info about what is wrong (and that will be down in the detailed bits of the returned sense data).
>>
>> Invalid OP Code is not valid for a disk to return (as per previous comments), but INVALID FIELD IN CDB means you made a mistake.
>>
>> 	Fred Knight
>>
>> -----Original Message-----
>> From: david.black@emc.com [mailto:david.black@emc.com]
>> Sent: Monday, January 24, 2011 10:39 AM
>> To: folkert@vanheusden.com; ips@ietf.org
>> Subject: Re: [Ips] this list
>>
>> That's actually more of a generic SCSI question than an iSCSI question, but anyhow ...
>>
>> ... if READ CAPACITY (10) doesn't work, try READ CAPACITY (16) [opcode 0x9E, service action 0x10].
>>
>> OTOH, if READ CAPACITY (10) results in a Check Condition for invalid opcode, the target that issued that CC does not comply with the SCSI standards, as support for READ CAPACITY (10) is mandatory for block devices in both the SBC-2 standard and all drafts of the in-progress SBC-3 standard.
>>
>> Thanks,
>> --David
>> ----------------------------------------------------
>> David L. Black, Distinguished Engineer
>> EMC Corporation, 176 South St., Hopkinton, MA  01748
>> +1 (508) 293-7953             FAX: +1 (508) 293-7786
>> david.black@emc.com        Mobile: +1 (978) 394-7754
>> ----------------------------------------------------
>>
>>> -----Original Message-----
>>> From: ips-bounces@ietf.org [mailto:ips-bounces@ietf.org] On Behalf Of folkert
>>> Sent: Monday, January 24, 2011 8:30 AM
>>> To: ips@ietf.org
>>> Subject: [Ips] this list
>>>
>>> Hi,
>>>
>>> Is this list available for generic iSCSI questions?
>>>
>>> If so: some (linux iscsi target and window iStorageSErver) respond with
>>> valid data to Read Capacity(10) SCSI 0x25 command while for example
>>> nexenta store (an opensolaris system) responds with Check Condition.
>>> So I guess this is not the common way of determing the sector size and
>>> size of the device.
>>> Which command should I use for this?
>>> Thanks.
>>>
>>>
>>> Folkert van Heusden
>> _______________________________________________
>> Ips mailing list
>> Ips@ietf.org
>> https://www.ietf.org/mailman/listinfo/ips
>
> Folkert van Heusden
>