This article is part of an Essential Guide, our editor-selected collection of our best articles, videos and other content on this topic. Explore more in this guide:
1. - LUN storage and how it works: Read more in this section
Explore other sections in this guide:
- 2. - Best practices to ensure efficient LUN implementation
- 3. - Using LUNs to ease storage management
What is a LUN? Why do we have to create LUN, rather use the disk as it is?
A LUN is a Logical Unit Number. It can be used to refer to an entire physical disk, or a subset of a larger physical disk or disk volume. The physical disk or disk volume could be an entire single disk drive, a partition (subset) of a single disk drive, or disk volume from a RAID controller comprising multiple disk drives aggregated together for larger capacity and redundancy. LUNs represent a logical abstraction or, if you prefer, virtualization layer between the physical disk device/volume and the applications.
The term virtualization has been used to mean many different things; thus, the virtualization police may or may not agree to a LUN being a layer of virtualization. A LUN can be used to present a larger or smaller view of the disk storage to the server. For example if you partition a disk drive into smaller pieces for your application or system needs (perhaps your server's operating system has a disk drive size limit) the sub-segments would share a common SCSI target ID address with each partition being a unique LUN.
Another example would be with a RAID controller where multiple disk drives are mirrored (RAID-1) or stripped with parity (RAID-5) together to create a larger physical disk volume. A LUN would be used to represent the virtual disk devices made up of the disks in the RAID group. So, as it turns out, you may not need to create a LUN to use a disk device. For example, if you are simply attaching several JBOD (Just a Bunch Of Disk) disks to a server via SCSI, USB, Fibre Channel, or what ever interface you prefer, LUNs may not have to be created. If you are using a SCSI disk and you have not sub-divided it into different partitions, then the device would show up with a unique SCSI ID target and default LUN 0. Note that you will want to make sure the devices are properly addressed to avoid conflicts. So when it comes down to deciding whether or not you need a LUN, you have to ask yourself what type of storage you have, how it is configured and how you are going to use it. Most likely, unless you are using JBOD or a single disk device, you will be using LUNs as an abstraction layer to access your storage.