Thursday, 9 May 2013

LUN management basics


A logical unit number (LUN) is a unique identifier used to designate individual or collections of hard disk devices for address by a protocol associated with a SCSIiSCSI, Fibre Channel (FC) or similar interface. LUNs are central to the management of block storage arrays shared over a storage area network (SAN). 
The term LUN dates back to the early days of SCSI when each device was identified by a logical number, up to eight in those days. Now servers with a dozen or more LUNs are common and it's getting less common for them to be connected to a conventional internal SCSI disk array. However, the basic element of storage for the server is still referred to as the LUN.
Each LUN identifies a specific logical unit, which may be a part of a hard disk drive, an entire hard disk or several hard disks in a storage device. So a LUN could reference an entireRAID set, a single disk or partition, or multiple hard disks or partitions. In any case, the logical unit is treated as if it is a single device and is identified by the LUN.
Here's how LUNs work with SCSI:
A SCSI (Small System Computer Interface) is a parallel interface that can have up to eight devices all attached through a single cable; the cable and the host (computer) adapter make up the SCSI bus. The bus allows the interchange of information between devices independently of the host. In the SCSI program, each device is assigned a unique number, which is either a number between 0 and 7 for an 8-bit (narrow) bus, or between 8 and 16 for a 16-bit (wide) bus. The devices that request input/output (I/O) operations are initiators and the devices that perform these operations are targets. Each target has the capacity to connect up to eight additional devices through its own controller; these devices are the logical units, each of which is assigned a unique number for identification to the SCSI controller for command processing.
In LUN zoning, SAN fabric is configured to match LUNs to the proper servers. As a rule, end devices such as hosts can only see and access storage within their zone. Limiting access in this way improves security and allows bandwidth allocation through assigning particular ports to a zone.
LUN masking is a further constraint added to zoning, subdividing access to the port so that only LUNs authorized to access a specific server can access the corresponding port. Then, even if several LUNs are accessed through the same port, the server masks can be set to limit each server's access to the appropriate LUNs. LUN masking is typically conducted at the host bus adapter (HBA) or switch level.

Logical unit numbers (LUNs) are standard in most data storage management software. Although extremely helpful in large data storage enterprises, LUNs are just as important for small- to medium-sized businesses (SMBs). This tip explores the background of LUNs in an SMB data storage environment, the different LUN features vendors have to offer and how to determine what type of LUN is best for your environment.
LUN is a chunk of virtualized storage that is treated the same way as a disk. LUNs can include part of a physical disk or span several disks or arrays. Furthermore, by using volume manager software, such as Veritas Volume Manager from Symantec Corp., LUNs can be combined into larger logical volumes. The benefit of this is better control over virtualized storage without having to carve up your storage again with a new schema of LUNs. It can also aid performance if the LUNs that are combined into a single logical volume to support, say, a database, are on different physical disks or arrays.
What's the difference between a LUN and a volume?
LUNs versus volumes is a little tricky because the terms are sometimes used synonymously -- hence referring to a "logical" volume. The simplest explanation is that a logical volume can contain more than one LUN.
LUNs are used for basic data management in an SMB and managing data in large enterprises. A typical enterprise may have hundreds or thousands of LUNs encompassing thousands or tens of thousands of physical disks and solid-state storage devices.
LUN management is a standard feature in storage management software. Most data storage products can handle the basics of creating LUNs. But having more than just the basics of LUN management is something many vendors aim for. Many products come equipped with additional and helpful LUN features. For example, Hewlett Packard (HP) Co.'s StorageWorks XP LUN Configuration and Security Manager offers standard LUN management features, as well as LUN size expansion and volume size configuration. It also prevents unauthorized servers from accessing the data.
LUN masking and zoning in data storage management
Masking and zoning are key features of logical unit number management. In a well-managed system using LUN masking and zoning, users and servers can only see the storage resources they are allowed to access.
Zoning involves configuring the storage area network (SAN) fabric so LUNs are matched to the proper servers. Generally, end devices such as hosts can only see and access storage in the same zone. In addition to the obvious security advantages of limiting access to certain areas of storage to those servers who need it, zoning also allows allocating bandwidth by assigning particular ports to a zone. This ensures the ability to meet service levels.
Masking carries the concept of zoning a step further. Zoning limits a server's ability to see and access storage to certain ports on the SAN. However, each of those ports may serve more than one LUN. For example, if a port attaches to a storage array and the array has four or five LUNs, simple zoning may leave all those LUNs visible to any server which is given access to those ports.
Masking by server allows further subdividing access to the port. Only the LUNs authorized to access a specific server can then have access to the corresponding port. Then, even if several LUNs are accessed through the same port, the server masks can be set to limit each server's access to the appropriate LUNs. Also, LUN masking is typically done at the host bus adapter (HBA) or at the switch level.
Purchasing a LUN
Since LUN management is so central to modern storage management, it is seldom a separate purchase. Most enterprises use their data storage management software (the software you're using to manage storage) or sometimes software supplied with their switches or HBAs to handle LUNs.
Keep in mind that although LUN management is a basic feature in storage management software, vendors tend to implement separate LUN functions differently, such as zoning and masking. It is important to be thoroughly familiar with the way your software performs these operations before you begin to set up or manage LUNs. You need to understand the implementation as well as the functionality.
For example, different storage management packages can use a different sequence of operations to establish LUN zones and may have different naming conventions -- requiring a Zone 0 vs. a Zone 1, for example. Having the first zone be Zone 1 when the software is expecting it to be Zone 0 is likely to cause a problem. This is explained in the software management documentation, but it will be different for different software packages. You not only need to understand what a zone is, you have to follow the docs to set one up in your specific software.
Basic operations such as creating LUNs are usually extremely simple. Many programs, such as NetApp's System Manager have wizards to guide you through the process. But knowing which LUNs you want to create is more complicated. It's important to spend some time figuring out how you want to carve your data storage pool up into LUNs for best performance.
Respecting the physical data storage device
Although logical unit numbers are an example of virtualized storage and greatly simplify storage management on a SAN, it's important to remember that there are physical storage devices underlying them. This is especially true when it comes to deciding how you will carve that physical storage up using LUNs.
Because LUNs are so central to the process of managing enterprise data storage, their performance can have a major impact on storage I/O. This is especially true when supporting databases and other applications that put high demands on storage systems. A well-designed LUN schema can help to balance the load on the storage system and improve performance. But be careful when designing a LUN schema, because if you build one that tries to run too many competing LUNs through the same channel -- for example off the same set of spindles in an array -- it can bottleneck your system and degrade performance.
Another consideration in designing a LUN schema is the performance of the underlying physical storage. For high performance applications such as transactional databases, it's a good idea to use the fastest storage you have, i.e., 15000 rpm disks with direct Fibre Channel (FC) connections. Less demanding applications can use LUNs containing less expensive storage such as 7,200 rpm SATA disks.
While storage management software is seldom chosen just on its ability to manage LUNs, and all the SAN storage management products out there handle the basics of LUNs, there are some optional features you may want in your SMB data storage environment. One of the most useful is the ability to reallocate storage to LUNs "on the fly," without reconfiguring the entire LUN schema. This is especially useful for load balancing since it makes it easier to assign storage where it is needed on an ongoing basis. Products such as Cisco's Data Mobility Manager offer this feature.

Managing logical unit numbers (LUNs) is among the most important concepts to understand with regard to data storage networking. This tip discusses five fundamental ideas storage professionals must understand when dealing with LUN management.
1. A LUN is really nothing more than a logical reference point to a portion of the available storage. This is a fancy way of saying a LUN is versatile when it comes to the ways it can be used. A LUN can reference a disk, a portion of a disk, an entire storage array or part of a storage array.
LUNs simplify storage management. Without them, you would likely need separate mechanisms to assign access and control privileges to various types of storage. For example, you might need one mechanism to assign permissions to a disk and another to assign permissions to an array. LUNs make it possible to assign access control and permissions in a consistent manner regardless of the underlying storage type.
2. LUN management works slightly differently for iSCSI and Fibre Channel (FC) storage.Typically, in an FC environment, a LUN created on a storage device is accessible directly by a server. You must simply specify which server will access the LUN and which host bus adapter (HBA) port will be used. The actual method for doing so varies based on the software used.
In the case of iSCSI, there is an extra step that must be performed. ISCSI connections are not made directly to LUNs, but rather to an iSCSI target, and a target is responsible for managing the connection between the server and the LUN. Among other things, an iSCSI target defines the IP addresses allowed to connect to the underlying LUN.
3. Multipath I/O is a feature that allows multiple read and write paths to a LUN.Multipath I/O can be used to increase storage availability. For example, a server might use multipath I/O to connect two HBA ports to a common LUN by way of two separate FC switches. That way, if an FC switch or HBA fails, the server would still be able tocommunicate with the LUN.
Multipath I/O is also used in failover clustering. Most Windows-based failover clusters are based around the use of Cluster Shared Volumes that are accessible to every node in the cluster. Because storage volumes are normally only connected to a single server, themultipath I/O feature must be used to facilitate connectivity to multiple servers.
4. When you create a LUN, you must specify the LUN type. The types of LUNs you can create vary based on the software you are using and the underlying physical storage. In a Windows environment, there are five different types of LUNs that can be created:
  • Simple LUNs occupy a single physical disk or a portion of a single physical disk.
  • Spanned LUN. This type of LUN is generally too large to fit onto a single disk (or within the remaining space on a physical disk), so portions exist on multiple physical disks.
  • Striped LUN. Just like a spanned LUN, a striped LUN makes use of multiple disks. The difference is that striping writes data to each disk in the LUN at the same rate. The idea is to use multiple spindles to provide higher speed read and write access than would be possible using a single disk.
  • Mirrored LUN. A fault-tolerant set that uses two or more disks. Write operations are simultaneously performed on each disk in the mirror set.
  • Striping with parity. Striping with parity is very similar to a striped LUN. The difference is that parity data is written to each disk in the stripe set. This way, if a disk failure occurs, the parity information can be used to rebuild the lost disk. There are many different variations of striping with parity. Some can survive the failure of a single disk within a set, while others can survive multiple disk failures. Striping with parity delivers lower performance than a stripped LUN and provides significantly less storage space because of the overhead involved in writing and storing parity data.
5. Most storage platforms allow LUNs to be extended. However, it is best to define the correct LUN size when the LUN is created rather than creating the LUN with the mindset that it can be extended later on.

MORE ON LUN MANAGEMENT

Sub-LUN-level tiering: What to consider
How do you make a snapshot of a LUN?
One of the reasons for this is that LUN extensions tend to impact performance. By definition, an extended LUN is fragmented (in much the same way a spanned LUN is fragmented because it exists on multiple disks). Fragmented LUNs tend not to perform as well as LUNs that do not span disks.
More important, extending a LUN does not necessarily make more storage space available to the server connected to the LUN. This is because extending a LUN is not the same as extending the partition that exists on the LUN. Depending on the server's operating system and the partition type, extending a partition to match a LUN extension may prove to be impossible.


No comments:

Post a Comment