What is the logical unit number? It can be abbreviated as LUN, which is a unique identifier used to specify an individual or collection of physical or virtual storage devices that perform input/output (I/O) commands with the host.
What Is a Logical Unit Number?
What is a LUN? It is short for logical unit number. In computer storage, it is a number used to identify the logical unit. The logical unit is a device addressed by the SCSI protocol or Storage Area Network protocols (such as Fibre Channel or iSCSI) that encapsulate iSCSI.
LUNs can be used with any device that supports read/write operations, such as tape drives, but is most commonly used to refer to logical disks created on a SAN. Although technically incorrect, the term “LUN” is also commonly used to refer to the logical disk itself. Keep reading, and MiniTool will tell you how LUN works.
How Does LUN Work?
LUN setup varies by system. When the host scans the SCSI device and finds a logical unit, it will assign a logical unit number. When the LUN is combined with information such as the target port identifier, it identifies a specific logical unit for the SCSI initiator.
In one or more storage systems, the logical unit may be a part of a storage drive and the entire storage drive, or it may be all parts of several storage drives, such as a hard disk drive and a solid-state drive.
The LUN can reference the entire RAID set, a single drive or partition, or multiple storage drives or partitions. In any case, the logical unit is regarded as a single device and is identified by the logical unit number. LUN capacity limitations vary by system.
The LUN is the core of block storage array management in the storage area network. The use of LUNs can simplify the management of storage resources because logical identifiers can be used to assign access and control privileges.
Types of LUNs
The underlying storage structure and logical unit types play a role in performance and reliability. Here are some types of LUNs listed below:
Mirrored LUN is a fault-tolerant LUN with the same copies on two physical drives for data redundancy and backup.
Concatenated LUN combines multiple LUNs into a logical unit or volume.
Striped LUN writes data across multiple physical drives and potentially improves performance by distributing I/O requests among the drives.
Striped LUN with parity spreads data and parity information across three or more physical drives. If the physical drive fails, you can reconstruct the data from the information on the remaining drives. Parity calculations may affect write performance.
LUN Uses
The main use case for LUNs is as an identifier for specifying storage devices. However, the usage of each LUN type may be different. For instance, a simple LUN is used as a designator for a part or the entire physical disk. A spanned LUN is a designator that represents a LUN that spans two or more physical disks.
The mirrored LUN is used to instruct to copy the data retained on one disk to the second disk – if one disk fails, the mirrored LUN is used.
LUNs can be used for zoning and masking in the SANs, or they can be virtualized to map multiple physical LUNs.
LUN Zoning and Masking
LUN zoning provides isolated paths for I/O through the FC SAN structure between end ports to ensure deterministic behavior. The host is limited to the zone where the host is allocated. LUN zoning is usually set on the switch layer. It can help enhance security and eliminate hot spots in the network.
LUN masking restricts host access to specified SCSI targets and their LUNs. LUN masking is usually done on the storage controller, but it can also be implemented on the host bus adapter (HBA) or switch layer. With LUN masking, multiple hosts and zones can use the same port on the storage device. However, they can only see specific SCSI targets and LUNs that have been allocated.
LUNs and Virtualization
In a sense, the LUN constitutes a form of virtualization, that is, it uses standard SCSI method of identification and communication to abstract the hardware devices behind it. The storage object represented by the LUN can be set, compressed, or deduplicated, as long as the representation of the host remains unchanged. You can migrate, copy, replicate, snapshot and tier LUNs within and between storage devices.
You can create a virtual LUN to map to multiple physical LUNs and virtualize capacity, which can be created outside the available physical space. Creating a virtual LUN that exceeds the available physical capacity can help optimize storage usage because physical storage is not allocated before data is written. It is sometimes referred to as a thin LUN.
Virtual LUNs can be set at the server operating system (OS), hypervisor, or storage controller level. Because the virtual machine (VM) cannot see the physical LUN on the storage system, LUN zoning is not required.
If you want more information about the LUN, then you can click this link.