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.


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.

MCTS (70-432) DBA Exam

The MCTS Exam 70-432 focuses on 8 main areas:
  • Installing and configuring
  • Maintaining instances
  • Managing security
  • Database maintenance
  • Data management
  • Monitoring and troubleshooting
  • High availability
Let’s take a closer look at the 8 areas.
1. Installing and Configuring SQL Server 2008 (10%)
Installing and configuring Microsoft SQL Server 2008 takes up 10% of the exams questions and assumes you are familiar with:
  • installing and configuring server instances including using the configuration manager and SQL browser;
  • the standard of being able to install Microsoft SQL Server 2008 and related services as well as knowing the installation paths, file locations, etc. You can refer to this MSDN article onhow to install Microsoft SQL Server 2008;
  • being able to configure additional SQL Server components such as SQL Server Integration Services (SSIS), SQL Server Analysis Services (SSAS), SQL Server Reporting Services (SSRS), etc.;
  • being able to implement database mail from installation, set up, and configuration;
  • and finally, it assumes you know how to configure, use, and populate full-text indexing.
2. Maintaining SQL Server Instances (13%)
The next focus point of the 70-432 exam is Maintaining SQL Server instances and makes up 13% of the questions on the exam. This focus point will test your knowledge and ability to:
  • manage SQL Server Agent jobs, operators, and alerts including creating, scheduling, enabling, and disabling jobs;
  • changing job step orders, managing notifications of job execution, and job logging;
  • managing performance condition alerts, SQL event alerts, and Windows Management Instrumentation (WMI) alerts;
  • understand and manage operator schedules, be able to fail safe and add new operators, and have a working knowledge of operator notification methods;
  • implement the Declarative Management Framework (DMF) including but not limited to creating, verifying, and enforcing a policy, scheduling a policy compliance check, and creating a condition;
  • and back up a SQL Server environment on an operating system level.
3. Managing SQL Server Security (15%)
The second largest focus point of the exam is based on managing SQL Server security and will make up 15% of the exam. This section of the exam will test your knowledge and ability to:
  • manage login, server, user, and database roles including being able to create, enable, and disable logins;
  • manage the security model in authentication mode, alter logins, enforce password policy, and manage fixed server roles;
  • manage user mapping, user-defined and fixed roles, and creating and deleting user roles;
  • SQL Server instance, database, schema, and object permissions including but not limited to logon triggers;
  • permissions vs. fixed role membership, cross-database ownership chaining, impersonation, and schema ownership;
  • understand transparent data encryption and impact of transparent data encryption on backups
  • use DDL triggers and logon triggers to audit SQL Server instances and be familiar with C2, common criteria in SQL Server instance audits, login failures, and event notifications
  • configure surface area through “sp_configure,” a function that displays and will allow you to change global configuration settings for the current SQL server (more on “sp_configure”here).
4. Maintaining a SQL Server Database (16%)
The next and largest focus point in the exam as listed by Microsoft’s learning center, is based on maintaining an SQL Server database and makes up about 16% of the exam’s total questions. This subject will require you to know:
  • how to backup and restore databases, as well as understand the different types of backups, such as differential backups, full backups, compressed backups, etc;
  • manage and configure databases and database snapshots, this includes creating, dropping, and reverting snapshots, as well as understanding database configurations options and recovery models;
  • maintain database integrity (using DBCC CHECKDB and suspect pages);
  • use maintenance plans along the way using the Maintenance Plan Wizard and Designer.
5. Performing Data Management Tasks (14%)
The next focus point takes up 14% of the exam and consists of questions related to performing data management tasks This includes importing and exporting data, managing data partitions, implementing data compression, maintaining indexes, and managing collations. These are, for the most part, just based on day to day use tasks such as working with indexes and using GUI tools to import and export data.
That’s a Lot of Expectations!
So far, there’s quite a bit of information to take in, don’t worry though, while the exam is very technical, it is also based on the most important aspects of SQL Server 2008. Which means during your training, while you may go over a lot you already know, you’ll be picking up a lot of great new information to help you along your career path. There are a lot of tasks, optimizations, and security aspects that you’ll learn along the way that will make your life easier in the long run, as well as help you pass the exam itself.
Back to the exam.
The final three sections of the 70-432 exam make up the remaining 32% of the exam:
6. Monitoring and Troubleshooting SQL Server (13%)
Next topic covers monitoring and troubleshooting, which makes up 13% of the exam. This focus point will test your ability to:
  • identify SQL Server problems in the database engine, SQL agent, and SQL browser services;
  • identify concurrency problems (blocks, locks, deadlocks, etc.) and SQL Agent job execution problems (proxy accounts, credentials, and job history);
  • locate error information such as error and agent logs, job execution history, and event logs.
7. Optimizing SQL Server Performance (10%)
Optimizing SQL Server performance is an important part of managing and running a successful SQL Server, and will take up 10% of the exam. This section mostly deals with using various sub-applications to optimize and analyze the server. You will be expected to be able to implement Resource Governor, use the Database Engine Tuning Advisor, collect trade data using SQL Server Profiler, collect performance data by using Dynamic Management Views (DMVs) and System Monitor, and finally, be able to use Performance Studio.
8. Implementing High Availability (9 percent)
The final section and focus point of the exam is based on Implementing High Availability (database replication/uptime assurance) and takes up the final 9% of the exam. This final section will ask that you understand how to implement database mirroring, clustered instances, log shipping, and replication as well as how to monitor, configure, and failover if necessary.