LUN (Logical Unit Number) is an identifier for a logical storage device that a storage system presents to a server for use as a separate block storage device. The term is most commonly used in SAN (Storage Area Network) environments and other block storage systems.
The term LUN is often used to refer not only to the number itself but also to the logical volume or storage resource to which that number is assigned. For example, an administrator may say “create a 2 TB LUN,” meaning the creation of a logical block device of that capacity and its presentation to a server.
How LUN Works
A physical storage system may consist of multiple HDDs or SSDs combined into RAID arrays or storage pools. Logical block devices of a specified size are created from the available storage capacity.
Each such device is assigned a LUN, which allows the server to identify it within its connection to the storage system. Once access is provided, the server detects the resource as a block device and can use it similarly to a local disk: it can create partitions and a file system or allow an application to access the device directly.
For example, a storage system may have a pool with a total capacity of 100 TB. An administrator can allocate several logical devices from this pool: 5 TB for one server, 10 TB for another, and 20 TB for a virtualization cluster. The servers work with the devices presented to them without directly managing the physical disks within the storage system.
LUN in a SAN
LUN is particularly closely associated with SAN architecture. In this type of infrastructure, servers receive block-level access to a centralized storage system through a dedicated storage network.
Commands and data are typically transmitted using Fibre Channel (FC) or iSCSI. Block storage can also be provided using other technologies, including FCoE.
From the operating system’s perspective, an accessible LUN appears as a disk, even though the data may physically reside across multiple drives within a remote storage system. This is one of the key differences between block storage and NAS. With NAS, a server accesses files through file-level protocols, while with a SAN and LUNs, it accesses block devices.
Server Access to LUNs
In corporate infrastructure, it is important not only to create a LUN but also to determine which servers can access it. Storage systems use access control mechanisms commonly known as LUN masking for this purpose.
LUN masking allows a specific LUN to be made accessible only to designated hosts. For example, a single storage system may serve dozens of servers, while each server can access only the storage resources assigned to it.
In a Fibre Channel SAN, this mechanism can be used together with zoning. Zoning restricts communication between devices at the FC network level, while LUN masking determines which logical storage devices are accessible to a particular server. These mechanisms address related but distinct tasks.
Where LUNs Are Used
LUNs are primarily used in enterprise storage systems, data centers, and virtualization infrastructure. They make it possible to centrally allocate storage capacity among physical servers and clusters.
For example, multiple virtualization servers can access shared block storage that holds virtual machine data. LUNs are also used for databases, clustered systems, and other applications that require block-level access to centralized storage.
A LUN does not necessarily correspond to a separate physical disk. It is a logical representation of storage resources, and its data may be physically distributed across many HDDs or SSDs.