What is a Logical Unit Number (LUN)?
A Logical Unit Number (LUN) is a number used for recognizing a logical unit related to computer storage. A logical unit is a device which can be addressed by computer network protocols like Fibre Channel (FC), Small Computer System Interface (SCSI), Internet SCSI (iSCSI), File Transfer Protocol (FTP) and other such related protocols.
Logical Unit Numbers are necessary for managing block storage arrays in a Storage Area Network (SAN). Typically a LUN can be utilized in processes with any component supporting read/write. The term LUN was termed way back from the days SCSI was used, where each device was identified with a logical number and the maximum number was limited to eight at that time. Now, servers with more LUNs are the trend and they are getting connected to a conventional internal SCSI disk array. Conversely, the fundamental of storage for the server is referred to as a LUN.
A logical unit number identifies a specific hard disk drive or a hard disk array in the storage environment with the help of a logical unit. So, taking this scenario into consideration a LUN could refer entire RAID set, a single drive or partition or multiple hard disk. In each case, the logical unit is treated as if it is a single device and is recognized by the LUN.
Understanding this term in a more technological way, let us assume a standard disk array which has several SCSI ports and all of them are assigned with respective target address. RAID formatting is applied onto the disk array and is partitioned into various storage units. So, a logical unit is configured to each volume and like-so several logical units are formed from several volumes.
In the same way, a disk drive has a single SCSI port and so has only one target with a single logical unit with zero LUN. Here it must be noted that zero signifies the entire storage of the disc drive. So, a number in-between zero and seven is allotted to each device in an 8-bit bus or a number between 8 and 16 is assigned to the device on a 16-bit bus.
When a device initiates an I/O request, it is called as an Initiator and the device which executes the request is known as a target. An individual target has the ability to interconnect with up to eight components or more, by using a controller. These components are called as Logical units and the SCSI LUN can be addressed with a combination of a target ID, disk ID, Controller ID and also a slice ID.