Logical Unit Number

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In computer storage, a logical unit number or LUN is simply the number assigned to a logical unit. A logical unit is a SCSI protocol entity, the only one which may be addressed by the actual input/output (I/O) operations. Each SCSI target provides one or more logical units, and does not perform I/O as itself, but only on behalf of a specific logical unit.

Contents

[edit] Examples

To provide a practical example, a typical disk array has multiple physical SCSI ports, each with one SCSI target address assigned. Then the disk array is formatted as a RAID and then this RAID is partitioned into several separated storage volumes. To represent each volume, a SCSI target is configured to provide a LUN. Each SCSI target may provide multiple LUNs and thus represent multiple volumes, but this does not mean that those volumes are concatenated.

Another example is a single disk drive with one physical SCSI port. It usually provides just a single target, which in turn usually provides just a single LUN numbered zero. This LUN represents the entire storage of the disk drive.

[edit] Other protocols

The term LUN is applicable not only to traditional parallel SCSI, but also to its descendants, like Fibre Channel Protocol (FCP), iSCSI, HyperSCSI, and others.

[edit] cXtXdXsX nomenclature in Unix

From the computer perspective, SCSI LUN is only a part of the full SCSI address. The full device's address is made from the:

  • controller ID of the host bus adapter,
    • target ID identifying the SCSI target on that bus,
      • disk ID identifying a LUN on that target,
        • an optional (and largely obsolete) slice ID identifying a specific slice on that disk.

In the Unix family of operating systems, these IDs are often combined into a single "name". For example, /dev/dsk/c1t2d3s4 would refer to controller 1, target 2, disk 3, slice 4. Presently Solaris, HP-UX, NCR, and others continue to use "cXtXdXsX" nomenclature, while AIX has abandoned it in favor of more familiar names.

[edit] Other uses

The term logical unit number also applies to an input/output access channel within certain programming languages.
For example, in FORTRAN, some input/output statements such as the READ or WRITE statements contain an ordered pair of numbers which identify the LUN of the file or other data source or destination, and (usually) also, the FORMAT of the data to be read or written, as in this example:

WRITE (5,32)

where 5 is the LUN of the target file or device, and 32 is the label of the FORMAT statement for the write.


[edit] iSCSI Logical Unit Number

(Copied from page http://en.wikipedia.org/wiki/ISCSI#Logical_Unit_Number)
In SCSI terminology, LUN stands for logical unit number. A LUN represents an individually addressable (logical) SCSI device that is part of a physical SCSI device (target). In an iSCSI environment, LUNs are essentially numbered disk drives.
An initiator negotiates with a target to establish connectivity to a LUN; the result is an iSCSI connection that emulates a connection to a SCSI hard disk. Initiators treat iSCSI LUNs the same way as they would a raw SCSI or IDE hard drive; for instance, rather than mounting remote directories as would be done in NFS or CIFS environments, iSCSI systems format and directly manage filesystems on iSCSI LUNs.

In enterprise deployments, LUNs usually represent slices of large RAID disk arrays, often allocated one per client. iSCSI imposes no rules or restrictions on multiple computers sharing individual LUNs; it leaves shared access to a single underlying filesystem as a task for the operating system.

[edit] See also

Personal tools