Subject: [Ips] this list

From: folkert <[email-masked]>
Date: Mon, 24 Jan 2011 14:30:21 +0100

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

-- 
Nagios user? Check out CoffeeSaint - the versatile Nagios status
viewer! http://www.vanheusden.com/java/CoffeeSaint/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com

---

From: <[email-masked]>
Date: Mon, 24 Jan 2011 10:39:05 -0500

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
[email-masked]        Mobile: +1 (978) 394-7754
----------------------------------------------------

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of folkert
> Sent: Monday, January 24, 2011 8:30 AM
> To: [email-masked]
> Subject: [Ips] this list
> 
> Hi,
>

---

From: "Knight, Frederick" <[email-masked]>
Date: Mon, 24 Jan 2011 10:58:32 -0500

The list [email-masked] is good for generic SCSI questions like this.

Basically, if it's a disk, you've got a device that is violating SCSI
standards.  That command is a mandatory (a command the device MUST
support) for a block/disk device.  If the device is not a disk, then
different rules would apply.

	Fred Knight

-----Original Message-----
From: folkert [mailto:[email-masked]] 
Sent: Monday, January 24, 2011 8:30 AM
To: [email-masked]
Subject: [Ips] this list

Hi,

Folkert van Heusden

-- 
Nagios user? Check out CoffeeSaint - the versatile Nagios status
viewer! http://www.vanheusden.com/java/CoffeeSaint/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
_______________________________________________
Ips mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/ips

---

From: "Knight, Frederick" <[email-masked]>
Date: Mon, 24 Jan 2011 11:09:30 -0500

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: [email-masked] [mailto:[email-masked]] 
Sent: Monday, January 24, 2011 10:39 AM
To: [email-masked]; [email-masked]
Subject: Re: [Ips] this list

Thanks,
--David

---

From: folkert <[email-masked]>
Date: Mon, 24 Jan 2011 17:27:09 +0100

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

Folkert van Heusden

-- 
MultiTail ist eine flexible Applikation um Logfiles und Kommando
Eingaben zu überprüfen. Inkl. Filter, Farben, Zusammenführen,
Ansichten etc. http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com

---

From: Ralph Weber <[email-masked]>
Date: Mon, 24 Jan 2011 11:12:49 -0600

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