A logical unit number (LUN) is, technically, the number used to define a physical device addressed by the SCSI or Fiber Channel protocol. The term is also used to refer to the logical disk that is created on a SAN.
When considering the LUNs that the storage is going to present to the OS, you have to answer two questions: How big should each LUN be, and how many should you have? The starting point for answering these questions is determining how much storage you need. If you have differing storage requirements, you also need to know how much of each different type you require. Different types of storage might range from high speed, high reliability for data and log; low speed, high reliability for archive data; high speed, low reliability for backup staging (before writing to tape), and low speed, low reliability for “other” storage that doesn’t have tight performance criteria or present reliability concerns.
The next factor to be considered is LUN size. For a SAN-based system, or large local storage array, this equates to how big you make each chunk of storage to be presented to the operating system. These LUN-sized chunks of storage are how the OS sees the storage. By now, you may know from virtualization that the OS has no way to know how many disks, or how much from each disk, each LUN represents.
A number of factors can influence your decision about LUN size. For instance, you need to consider how the storage is to be mounted in the OS. If you mount each LUN as its own volume, you can make them a little larger. You want to stay well below this limit due to backup, restore, and startup times. On startup, the OS runs a basic check of each volume. If an error is found on the volume, the OS runs a Check Disk (CHKDSK). If the volume is large, the time taken to run CHKDSK can become long — in some cases, extremely long — which can start to have a large impact on system startup time. For large enterprise servers with less than one server restart scheduled per year, this isn’t a major problem, except when it’s time to set up everything — installing the OS and drivers and configuring the server. Many reboots may be required. If each reboot takes 30–45 minutes, restarting the server eight or more times becomes a two day labor, rather than something you do while getting another coffee refill.
On Windows 2008, the maximum size of Master Boot Record (MBR) volume is 2TB. GBT volumes have a maximum size of 9+ zettabytes. One ZB is equivalent to 1 million petabytes.
Number of LUNs
If there are no clear criteria that set an ideal size for each LUN, there may be factors that dictate a specific number of LUNs. The simplest way to determine the number of LUNs you need is to decide how you want the data laid out on the physical disks in the storage array. As a starting point, you need one LUN for tempdb, one LUN for data files and one LUN for database log files. This is in addition to the system volume as no data, log, or tempdb files should reside on the system volume.