SANs For Less

First, a little background. SANs are essentially storage networks that "trick" one computer (which we'll call Computer A) into seeing storage devices on another computer (which we'll call Computer B) as though they were local to the first computer, Computer A. To the OS and applications on Computer A, a SAN-based storage device on Computer B is no different from a disk drive that is physically installed in Computer A. In other words, the SAN disk on Computer A is a virtual local disk. Because SAN devices look like local disk, they cannot be used simultaneously by multiple computers.

Some SANs also support real physical or emulated-on-disk tape drives and autoloaders. However, in this Recipe, I will focus only on pure SAN disk devices.

SANs are very different from NAS (Network Attached Storage). NAS devices emulate that part of a network operating system that supports server drive mapping. Computer A maps a drive to Computer B, the NAS device. The mapped drive is not treated as local storage by Computer A's operating system. NAS devices are best used for the kind of file sharing supported by such operating systems as Microsoft Windows, Novell NetWare and various flavors of UNIX and Linux.

SANs are especially useful for applications that work only with local storage and do not work with mapped network drives. Examples include backup and recovery software, as well as most database and e-mail programs. Also SANs fit well into clustered server environments that manage access by multiple computers to the same SAN-based storage devices, though not at the same time.

id
unit-1659132512259
type
Sponsored post

SANs can be built using a variety of operating systems, including Windows, NetWare, Unix, and Linux. In this article, we will build a SAN network based on Windows.

Two Keys

SAN architecture is based on two key concepts: targets and initiators.

A target is the storage device that is presented for use by an initiator, which is typically a workstation or server. Targets reside on SAN hardware. As an example, let's refer back to our hypothetical Computers A and B. Computer B presents targets, and Computer A initiates the use of those targets.

SAN hardware can present multiple targets. Initiator computers can have multiple connections to targets. However, because of the characteristics of local disk drives, no initiator computer can use a target disk that is already being used by another initiator computer.

Initiators and targets alike communicate over networks. Both iSCSI and Fibre Channel networks are used. iSCSI networks run on Ethernet, preferably 1 Gigabit Ethernet (GbE). 100 Base T Ethernet works, but it's 10 times slower than GbE. Fibre Channel networks run on their own adapters and protocol and provide up to 2 Gbits of throughput. Both iSCSI and Fibre Channel allow applications to issue standard SCSI commands when communicating with target devices. For this Recipe, I will concentrate on iSCSI SANs.

The diagram below shows an iSCSI SAN network in action. Each gray rectangle is a computer. Notice that data flows (gets pushed) from initiators to targets. In other words, applications run on initiators, not targets.

Target and initiator functionality is provided by SAN software. Software can reside in either RAM or in flash ROM. Commercial SAN hardware frequently uses flash ROM. You can buy Ethernet adapters with flash ROM-based iSCSI initiator support.

I will show you how to use relatively inexpensive RAM-resident iSCSI target software and Microsoft's free RAM-resident iSCSI initiator software. Note: Microsoft's software does not run on Windows NT. For that, you will need an Ethernet adapter with built-in flash ROM-resident iSCSI initiator support that works with NT.

Now that you have a basic grounding in SAN technology, let's start building your SAN. First, here are the components you'll need.

Ingredients

Hardware

iSCSI SAN Target Software

String Bean Software's WinTarget. The demo supports a single initiator connection. Licenses are available for one to an unlimited number of initiator connections.

iSCSI SAN Initiator Software

Microsoft iSCSI Software Initiator. Download from Microsoft.

Applications

Any software can be used. I will test and demonstrate the use of SAN storage with Veritas Backup Exec 9.1.

Step 1: Install the iSCSI Initiator Software

Now that we have our components together, let's start building the SAN.

First, install the Microsoft iSCSI initiator software. You won't configure the software yet. But you need to install it so that you can discover what name has been given to the computer running the initiator.

To install the software, right-click the Microsoft initiator MSI installation file you downloaded and select Install. When the installation is complete, select Start > Settings > Control Panel > iSCSI Initiator. You can also use the icon named Microsoft iSCSI Initiator placed on your desktop during installation.

Next, tab over to the Initiator Settings page of the iSCSI Initiator Properties dialog box. You will find the initiator name in the Change Initiator Node Name area at the bottom of the page, as shown below.

The name of the computer on which I have installed the initiator is: iqn.1991-05.com.microsoft:barry02.la.local. You may have to use the right arrow key in the Change To field to see the entire name. Don't change anything unless you know what you are doing. Just write down the name.

Step 2: Install and Set up the iSCSI Target Software

Install the WinTarget software by double-clicking on the file you downloaded. A service called WinTarget is installed along with a program for configuring the SAN targets you create on the computer.

Once the software is installed, open the configuration program by selecting Start > Programs > String Bean Software > WinTarget > WinTarget Console. The WinTarget Console can also be added as a snap-in to an instance of Microsoft Management Console, as in the screen captures shown here.

First, you need to create one or more WinTarget disks. The screen shot below shows how to do this. In a manner similar to the Storage > Disk Management container (the location of which is shown below), the WinTarget > Devices container shows the computer's disk drives and partitions.

Click to view screen shot in separate window.

However, the WinTarget container shows you only whether a specific drive can be used as a WinTarget target device. When a drive or partition is used for a WinTarget target device, all data stored on it is erased. Drive C:, the boot drive, is not usable for obvious reasons. Drive E:, a partition on Disk 0, is available, but because the drive is being used for other purposes, I don't want to select it to become a WinTarget target device. So I select the Unallocated Disk 1. This is a disk that has no Windows partitions on it.

Next, select "Create WinTarget Disk." This opens the Welcome screen of the disk-creation wizard. Click Next to move to the Select Size wizard page. In the screen shot below, I've chosen to create a roughly 20 GB disk. To move on, click Next.

On the next page, enter a descriptive name for the WinTarget Disk. Click Next to move to the page where you specify the initiator computers that can connect to this target disk. Click Add to add an initiator computer name, as shown below. Enter the name you wrote down back when you installed the initiator software.

Click to view screen shot in separate window.

The name for each target and initiator computer must be unique. These names are a world unto themselves. The WinTarget documentation contains an extensive discussion of the rules for constructing these names.

Click OK to add the initiator name. Then click Next to move on to the next wizard page. This page tells you that WinTarget is ready to create your disk. Click Next. You'll see a dialog box warning that you are about to create a WinTarget disk and that data on the disk will be destroyed. Click OK, and the disk is created.

The screen shot below shows the target disk. In keeping with SCSI terminology, the disk is created as a LUN (Logical Unit Number). In this case, it's a virtual rather than a physical LUN called LUN 1.

Click to view screen shot in separate window.

You don't have to do anything else here. When you first connect to the disk with an initiator computer, you will format the disk.

Next, you will be offered a few task options. Your target setup will work fine if you don't do any of them. Check the WinTarget documentation for more information on these tasks. For example, to add additional initiator names, right-click the disk you want to modify and select Properties. To set security and other parameters for the target computer, right-click the WinTarget container and select Properties.

In the next screen shot, you can see that I have created another target disk. This one uses the rest of the available space on Disk 1 and is LUN 2. If you have space, you might want to create another target disk, too.

Click to view screen shot in separate window.

If you have installed the Computer Management snap-in in the Microsoft Management Console, take a look at the Storage > Disk Management container. You will see the disk or disks you created displayed in a format similar to the one in the screen shot above. You can also select Start > Programs > Administrative Tools > Computer Management to see the Disk Management container. Don't do anything with the disks you see. They are now under the management of the WinTarget service.

Step 3: Set Up the iSCSI Initiator Software

You can find documentation for the initiator software in

Program Files>Microsoft>Microsoft iSCSI Initiator>doc>uguide.doc on the disk where you installed the initiator software. You will find it useful for tasks I don't discuss here. You need only do the tasks detailed below to connect to a target.

First, select Start > Settings > Control Panel > iSCSI Initiator. This opens the iSCSI Initiator Properties dialog box shown below.

We need to add a target portal. Click Add. This opens the dialog box shown below. If your target computer is registered in a DNS that your initiator computer can access, then enter the DNS name of the computer. If not, then enter the IP address of your target computer. Next, click OK. You can click Advanced to set up such things as security.

Now tab over to the Available Targets dialog box as shown in the screen shot below. Notice that the initiator software lists the target computer name. It found this after you entered the IP address or DNS name of the target computer.

Next, click Log On to open the Log On To Target dialog box, shown in the screen shot below. Click Advanced to see the same setup dialog box you get when clicking Advanced on the Add Target Portal dialog box shown earlier. Yes, there are two places where you can set security and other parameters. The first is for initial setup, while the second is for making modifications after initial setup.

To connect to the iSCSI target computer, Click OK on the Log On To Target dialog box. Tab over to the Active Sessions page to assure that you are connected to the target computer.

Next, open and click the Computer Management (Local) > Storage > Disk Management container, as shown below.

Click to view screen shot in separate window.

Note: From this point on, everything you do will be exactly the same as you would do with any locally attached Windows disk drive. You should see the target drive or drives to which this initiator computer has been granted access. If this is the first time you have ever connected to a drive (now called a disk), it will be marked Unallocated. If the disk has never been used with Windows, you will be offered an opportunity to initialize the disk. The Write Signature and Upgrade Disk wizard opens automatically and takes you through the initialization process.

After you initialize the disk or disks, the wizard will help you to create one or more simple volumes on each disk, format each volume, and assign a drive letter to it. The screen shot below shows the two iSCSI virtual disks on my initiator computer all set up and ready to be used as drives K: and L:.

Click to view screen shot in separate window.

If you are connecting for the first time to a target drive that has already been initialized and formatted, you'll see a small gray rectangle labeled Foreign Disk to the left in the lower pane of the Disk Management container. There will be no long rectangle with information about the disk. To use this disk, you must right-click the gray block and select Import Foreign Disks. The disk should now be available and ready to have a drive letter assigned to it.

Warning: When using WinTarget software, you should not log on to an iSCSI target drive with more than one initiator computer at a time. If you do, you will very likely destroy the contents of the target drive. Trust me, I've done it. After you re-log on to a target drive you will have to reactivate the disk. There will be a gray rectangle on the left side of the lower pane in the Disk Management container. It will say "Disk n Dynamic Offline," where n is a number. Right-click the rectangle and select Reactivate Disk. The long rectangle describing the disk's size and health will return, and it is now ready to use.

The software that supports some SAN hardware makes target drive sharing among initiators easy. WinTarget does not include such functionality; it also costs considerably less than most SAN software.

Step 4: Run an Application Using Virtual iSCSI Drives

The screen shot below shows that I have created a Veritas Backup Exec 9.1 disk-based backup folder, Exchange Virtual, on the virtual L: drive of my initiator computer. I will use this folder to backup up an Exchange 2003 information store.

Click to view screen shot in separate window.

In the screen shot below, I am setting up a backup to the backup-to-disk folder I created.

Click to view screen shot in separate window.

The next screen shot shows the backup running.

Click to view screen shot in separate window.

Backups to iSCSI virtual drives can run faster than backups to local drives. Take a look at the Job History pane in the screen shot below. The job Backup 0019 is the backup of the Exchange information store to the virtual L: drive. It took 17 minutes and 16 seconds to complete (including verification). Now move down three lines to the job EXCH01 Exch Inf Store to Disk, which backs up to a backup-to-disk folder on a local disk on the initiator computer. Notice that the same job took over 12 minutes longer to backup the same information store.

Click to view screen shot in separate window.

Finally, check out the next screen shot. Windows Explorer shows the actual files on the virtual L: drive that hold the backup-to-disk folder used for Backup 0019.

Click to view screen shot in separate window.

You will probably want to back up your iSCSI virtual-drive based backups. To do this, log on to the target drive containing the virtual-drive backups from an initiator computer that has a tape drive and backup software. Then back up to tape the folder or folders containing the backup files. Make sure that the initiator computer is the only one logged on to the virtual drive. The next version of WinTarget will allow you to access target drives on the target computer. This will make it easy to backup all targets with a tape drive attached to the computer and will eliminate the need to log one initiator computer out of a target before logging in the initiator computer with the tape drive.

The nice thing about backing up to a virtual drive is that the initial backup is fast. Backing up to tape can be much slower. With backups to virtual drives, you quickly get your backup onto another medium (disk) and then you can back it up to tape at a more leisurely pace. Of course, for the best protection, you should use iSCSI virtual drives that reside on RAID storage in your target computer.

Your iSCSI SAN network should now be up and running. You should also have a better understanding of SAN technology. And you have a SAN network that your clients can use for applications that place modest demands on their SAN hardware.

BARRY GERBER is a Los Angeles-based electronic communications, networking, and storage consultant and author. He is the author of the book Mastering Microsoft Exchange Server 2003 (Sybex, 2003) and co-author of Microsoft Exchange Server 2003 24seven (Sybex, 2004).

What do you think? Discuss this Recipe with other system builders on TechBuilder's Recipe Forum.