SANs (Storager Area Networks) provide the infrastructure ability to share a single large storage device across many servers or applications. To enable this the storage is typically carved into smaller pieces which are each assigned a SCSI logical unit number or LUN. Each LUN is then assigned to one or more servers as required by the configuration. LUN masking is the ability to exclusively assign each LUN to one or more host connections.
LUNs are block storage devices accessed via Ethernet SAN. Each LUN is uniquely identified within the Ethernet SAN by two numbers (x=major and y=minor). Valid
LUN numbers range for x = 0 to 65,535, and y = 0 to 255 (ie. x.y ranges from LUN 0.0 thru LUN 65535.255). The number that identifies a disk drive or other block device in a system; by extension, the disk itself as visible outside the server, whether it corresponds to a physical disk, a RAID group, or a virtual disk.
Physical LUN is fixed size LUN. LUN size is determined by the storage capacity of the disk (or disk RAID array). Virtual LUN is variable size LUN. LUN size is determined by the storage logical volume manager, using extents (chunks or block
addresses) allocated from a volume group (disk pool).
On a SCSI parallel bus (a type of inter-connect used to connect storage devices, it is different from fibre channel) it is possible to have different devices, and each one is given an address called a logical unit number (LUN). For those of you that have set jumpers or toggle switches on the back of a SCSI disk or tape drive, this is the number that is being set. The LUN on a SCSI parallel bus is actually used to electrically address the various devices. The concept of a LUN has been adapted to fibre channel devices to allow multiple SCSI devices to appear on a single fibre channel connection.
The LUN is required to be unique among all devices that are visible to each other. In the old world of a SCSI parallel bus it was very easy to define which devices were able to see each other since they were physically attached to the same cable. In the world of SAN’ s this definition is much broader since it is possible, although usually not desirable, that all devices attached to a SAN can see each other. A RAID controller that simulates multiple SCSI devices with different LUN’ s is said to have multi-LUN support. This allows a single RAID controller to present its storage as many smaller devices.
LUN Masking
LUN Masking is the capability that allows a specific LUN to be exclusively assigned and accessed by a specific list of host connections. Usually only one host connection will access a LUN at a time. By implementing LUN Masking it is possible to reliably attach a single LUN to a single host connection. Most importantly, other host connections will not be able to access LUN’s to which they are not assigned.
There are three places where LUN Masking can be implemented. The first is in the storage, the second is in the servers, and the third is either in a device through which all of the I/O passes or the SAN itself. Each of these has its benefits. In practice, LUN Masking at a customer site is implemented in multiple ways reflecting the different methods used by each vendor.
The method used by the host when it discovers storage is to query on each connection as to which LUN’s are available. If only a specific subset of LUN’s is return in response to that query then LUN Masking is being performed. LUN Masking is performed by hiding some of the LUN’s.
Each vendor implements LUN Masking differently and the method used by a customer typically reflects whatever is available in the equipment or software purchased. Each method has its benefits, however they all require some level of central administration and each is implemented slightly differently.
Implementation of LUN Masking on the server is attractive because it can be done with software and potentially this could span all server types. However host based LUN Masking requires all hosts to have a central administration to avoid conflicts.
If LUN Masking is implemented in the storage it is often times easier to have the central administration, however it is then dependent on the support the storage vendor provides.
Special devices to create and implement LUN Masking are attractive because they work with any products, however they require adding a new device, new anagement, and they can cause a performance bottleneck in large configurations.
Finally the idea of masking fibre channel devices with the fabric was presented, but this depends on the storage vendor to implement special functionality in their products. This method also does not provide any additional functionality over a multi-LUN storage controller with LUN Masking.
more from Wikipedia http://en.wikipedia.org/wiki/Logical_Unit_Number and http://en.wikipedia.org/wiki/Logical_Unit_Number_masking
more from Tech-FAQ.com http://www.tech-faq.com/lun-masking.html