[comp.periphs.scsi] LUN on SCSI drives

bill@unixland.uucp (Bill Heiser) (03/03/91)

I'm kind of confused about the "LUN" on SCSI drives...  For 
example, when I look at my drive configuration using scsicntl,
it shows both a SCSI id and a LUN for each unit.  I don't see
any documentation referring to LUN anyplace though.  Is that
something different from SCSI id?  How is it configured?  I don't
see any reference to it, at least in my CDC Wren manual (I'm still
waiting for Maxtor to send me the manual for the 8760S.)


-- 
home:	...!{uunet,bloom-beacon,esegue}!world!unixland!bill
	bill@unixland.uucp              The Think_Tank BBS & Public Access Unix
508-655-3848 (2400)   508-651-8723 (9600-HST)   508-651-8733 (9600-PEP-V32)
other:	heiser@world.std.com

db@seachg.uucp (David Bell) (03/05/91)

In article <1991Mar2.184349.1595@unixland.uucp> bill@unixland.uucp (Bill Heiser) writes:
>I'm kind of confused about the "LUN" on SCSI drives...  For 
>example, when I look at my drive configuration using scsicntl,
>it shows both a SCSI id and a LUN for each unit.  I don't see
>any documentation referring to LUN anyplace though.  Is that
>something different from SCSI id?  How is it configured?  I don't
>see any reference to it, at least in my CDC Wren manual (I'm still
>waiting for Maxtor to send me the manual for the 8760S.)
>
>

The SCSI spec allows up to 8 controllers on the bus, with SCSI id's from 0
to 7. Each controller may have up to four devices connected to it, with
Logical Unit Numbers from 0 to 3.

All devices that have built in SCSI controllers (such as the CDC Wren
drives) have a LUN of 0.

-- 
Dave Bell

Sea Change Corporation    
Mississauga, Ontario, Canada
UUCP: ...!uunet!attcan!seachg!db

gerry@zds-ux.UUCP (Gerry Gleason) (03/05/91)

In article <1991Mar2.184349.1595@unixland.uucp> bill@unixland.uucp (Bill Heiser) writes:
>I'm kind of confused about the "LUN" on SCSI drives...  For 
>example, when I look at my drive configuration using scsicntl,
>it shows both a SCSI id and a LUN for each unit.  I don't see
>any documentation referring to LUN anyplace though.  Is that
>something different from SCSI id?  How is it configured?  I don't
>see any reference to it, at least in my CDC Wren manual (I'm still
>waiting for Maxtor to send me the manual for the 8760S.)

LUN=Logical Unit Number, and it is different than SCSI ID.  The SCSI
ID aka Bus ID, is the address of a particular target controller, and
the LUN is used to identify each of more than one device at a particular
bus tap.  Since most of the drives that are out there have the target
controller integrated with the drive, each Bus ID typically only has on
logical unit (almost universally LUN 0), there is not much cause to
worry about LUN's.

I've only seen one device so far that has multiple LUN's.  Dennon CD-ROM
drives have can daisy chain up to four drives together on a proprietary
bus, with the SCSI cable going to one of them.  In this configuration,
each drive has the same bus-id, but a different LUN.

Gerry Gleason

neese@adaptx1.UUCP (03/05/91)

>/* ---------- "LUN on SCSI drives" ---------- */
>I'm kind of confused about the "LUN" on SCSI drives...  For 
>example, when I look at my drive configuration using scsicntl,
>it shows both a SCSI id and a LUN for each unit.  I don't see
>any documentation referring to LUN anyplace though.  Is that
>something different from SCSI id?  How is it configured?  I don't
>see any reference to it, at least in my CDC Wren manual (I'm still
>waiting for Maxtor to send me the manual for the 8760S.)

The LUN (Logical Unit Number) is a subset of the controller ID.  In SCSI
you can have a total (currently) of 8 target ID's (0-7) on the SCSI bus.
These target ID's are essentially the controllers/adapters on the bus.
Attached to each target ID/controller you can have 8 LUN's (0-7).  The
LUN is set in the actual SCSI command sent to the target/controller.
All in all you could have 56 devices on the SCSI bus (7 targets with
8 LUNS attached to each target = 56 (This assumes one adapter taking up
one of the target ID slots)).

			Roy Neese
			Adaptec Senior SCSI Applications Engineer
			UUCP @  neese@adaptex

gerry@zds-ux.UUCP (Gerry Gleason) (03/07/91)

In article <1991Mar4.185942.1554@seachg.uucp> db@seachg.UUCP (David Bell) writes:
>In article <1991Mar2.184349.1595@unixland.uucp> bill@unixland.uucp (Bill Heiser) writes:
>>I'm kind of confused about the "LUN" on SCSI drives...  For 

>The SCSI spec allows up to 8 controllers on the bus, with SCSI id's from 0
>to 7. Each controller may have up to four devices connected to it, with
>Logical Unit Numbers from 0 to 3.

Only partially correct.  LUN is a 3 bit field, therefore 0-7 are
possible.  Also, there is provision for a sub-LUN, via an extended
message which is 8 more bits.  (Wait let me make sure)

Yes, that's it.  You send:

01h	Extended message
02h	Extended message length
02h	EXTENDED IDENTIFY code
XXh	Sub-logical unit number

Gerry Gleason

goykhman_a@apollo.HP.COM (Alex Goykhman) (03/08/91)

In article <283400064@adaptx1> neese@adaptx1.UUCP writes:
>
>>/* ---------- "LUN on SCSI drives" ---------- */
>>I'm kind of confused about the "LUN" on SCSI drives...  For 
>>example, when I look at my drive configuration using scsicntl,
>>it shows both a SCSI id and a LUN for each unit.  I don't see
>>any documentation referring to LUN anyplace though.  Is that
>>something different from SCSI id?  How is it configured?  I don't
>>see any reference to it, at least in my CDC Wren manual (I'm still
>>waiting for Maxtor to send me the manual for the 8760S.)
>
>The LUN (Logical Unit Number) is a subset of the controller ID.  In SCSI
>you can have a total (currently) of 8 target ID's (0-7) on the SCSI bus.
>These target ID's are essentially the controllers/adapters on the bus.
>Attached to each target ID/controller you can have 8 LUN's (0-7).  The
>LUN is set in the actual SCSI command sent to the target/controller.
>All in all you could have 56 devices on the SCSI bus (7 targets with
>8 LUNS attached to each target = 56 (This assumes one adapter taking up
>one of the target ID slots)).

    SCSI allows up to 256 LUNs per target via an optional EXTENDED IDENTIFY
    message, though I am not aware of a single implementation that use it.
    SCSI-2 does not mention EXTENDED INTENTIFY at all, therefore is limited to
    8 LUNs per target.
>
>			Roy Neese
>			Adaptec Senior SCSI Applications Engineer
>			UUCP @  neese@adaptex


##############

RWM@cup.portal.com (Richard DARYL Millett) (03/15/91)

Actually according to the ANSI X3.131-1986 specifications you can actually
have 2,048 peripheral devices per target using extended messages.  That
is a possibilty of 14,336 devices on 1 SCSI bus.  (7*2048 = 14336) 

The Pioneer Optical drives support 4 LUNs per controller and I have heard
of a company that actually put all 28 possible drives on a SCSI bus
to see if it would work.

Richard Millett
Pioneer Communications
rwm@cup.portal.com