[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: this list



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@xxxxxxx [mailto:david.black@xxxxxxx]
Sent: Monday, January 24, 2011 10:39 AM
To: folkert@xxxxxxxxxxxxxx; ips@xxxxxxxx
Subject: Re:  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@xxxxxxx        Mobile: +1 (978) 394-7754
----------------------------------------------------

-----Original Message-----
From: ips-bounces@xxxxxxxx [mailto:ips-bounces@xxxxxxxx] On Behalf Of folkert
Sent: Monday, January 24, 2011 8:30 AM
To: ips@xxxxxxxx
Subject:  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@xxxxxxxx
https://www.ietf.org/mailman/listinfo/ips

Folkert van Heusden

_______________________________________________
Ips mailing list
Ips@xxxxxxxx
https://www.ietf.org/mailman/listinfo/ips


[IETF]     [Linux iSCSI]     [Linux SCSI]     [Linux Resources]     [Yosemite News]     [IETF Announcements]     [IETF Discussion]     [SCSI]

Add to Google Powered by Linux