ArticleslgStudy

mathematics

Logical unit number

Logical unit number is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Logical unit number rather than just read about it. In short: In computer storage, a logical unit number (LUN) is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or by storage area network (SAN) protocols that encapsulate SCSI, such as Fibre Channel (FC) or iSCSI. A LUN may be used with any device which supports read/write operations, such as a tape drive, but is most often used to refer to a logical disk as created on a SAN.

Key takeaways

  • Logical unit number belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Logical unit number to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Logical unit number from memory before moving on to harder problems.

Reference excerpt

In computer storage, a logical unit number (LUN) is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or by storage area network (SAN) protocols that encapsulate SCSI, such as Fibre Channel (FC) or iSCSI. A LUN may be used with any device which supports read/write operations, such as a tape drive, but is most often used to refer to a logical disk as created on a SAN. Though not technically correct, the term "LUN" is often also used to refer to the logical disk itself.

Examples To provide a practical example, a typical multi-disk drive has multiple physical SCSI ports, each with one SCSI target address assigned. An administrator may format the disk array as a RAID and then partition this RAID into several separate storage-volumes. To represent each volume, a SCSI target is configured to provide a logical unit. Each SCSI target may provide multiple logical units and thus represent multiple volumes, but this does not mean that those volumes are concatenated. The computer that accesses a volume on the disk array identifies which volume to read or write with the LUN of the associated logical unit. In another example: a single disk-drive has one physical SCSI port. It usually provides just a single target, which in turn usually provides just a single logical unit whose LUN is zero. This logical unit represents the entire storage of the disk drive.

Use How to select a LUN: In the early versions of SCSI, an initiator delivers a command descriptor block (CDB) to a target (physical unit) and within the CDB is a 3-bit LUN field to identify the logical unit within the target. In current SCSI, the initiator delivers the CDB to a particular logical unit, so the LUN appears in the transport layer data structures and not in the CDB. LUN vs. SCSI Device ID: The LUN is not the only way to identify a logical unit. There is also the SCSI Device ID, which identifies a logical unit uniquely in the world. Labels or serial numbers stored in a logical unit's storage volume often serve to identify the logical unit. However, the LUN is the only way for an initiator to address a command to a particular logical unit, so initiators often create, via a discovery process, a mapping table of LUN to other identifiers. Context sensitive: The LUN identifies a logical unit only within the context of a particular initiator. So two computers that access the same disk volume may know it by different LUNs. LUN 0: There is one LUN which is required to exist in every target: zero. The logical unit with LUN zero is special in that it must implement a few specific commands, most notably Report LUNs, which is how an initiator can find out all the other LUNs in the target. But LUN zero need not provide any other services, such as a storage volume. Many SCSI targets contain only one logical unit (so its LUN is necessarily zero). Others have a small number of logical units that correspond to separate physical devices and have fixed LUNs. A large storage system may have up to thousands of logical units, defined logically, by administrative command, and the administrator may choose the LUN or the system may choose it.

c_t_d_s_ 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:

c-part: controller ID of the host bus adapter, t-part: target ID identifying the SCSI target on that controller, d-part: disk ID identifying a LUN on that target, s-part: slice ID identifying a specific partition 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 "c_t_d_s_" nomenclature, while AIX has abandoned it in favor of more familiar names. HP-UX refers to this as the Legacy Naming Model since version 11i v3.

Other uses The term logical unit number also applies to an input/output access channel within certain programming languages.

See also Logical unit number masking (LUN masking)

References

Worked examples

Example 1 — a first encounter with Logical unit number

Start with the simplest possible case. Write down what Logical unit number claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Logical unit number before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Logical unit number ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Logical unit number

In research
Logical unit number appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Logical unit number in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Logical unit number is common in secondary-school and first-year university syllabi. It links to neighbouring topics SCSI, so understanding it makes those chapters shorter.
In everyday life
Look for Logical unit number outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Logical unit number” →

How to study Logical unit number in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Logical unit number means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Logical unit number out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Logical unit number in simple terms?

In computer storage, a logical unit number (LUN) is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or by storage area network (SAN) protocols that encapsulate SCSI, such as Fibre Channel (FC) or iSCSI. A LUN may be used with any device which supports read…

Why does Logical unit number matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Logical unit number?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Logical unit number.

Tags

  • SCSI

Keep exploring