Reviewing the scenario

Before we examine how to provision iSCSI virtual disks on Windows Server 2012, let's briefly review our scenario and what we've done so far.

Figure 1 shows the two servers we're using for our walkthrough. SRV-A is our application server, that is, the server that consumes the storage. In the previous article of this series we enabled the iSCSI initiator on this server. Recall that the iSCSI initiator is a client service running on a computer that enables users or applications to consume iSCSI storage on a target server. Windows Server 2012 has a built-in feature called (appropriately enough) iSCSI Initiator, which provides iSCSI client functionality by means of a Windows service called the Microsoft iSCSI Service.

SRV-B on the other hand is our storage server, that is, the server that provides block-based storage to the application server. In the previous article we made SRV-B an iSCSI target server by installing a role service called iSCSI Target Server. This role service can be installed either using Server Manager or by using the Install-WindowsFeature cmdlet of Windows PowerShell. For our test environment, SRV-B has direct-attached storage (DAS) in the form of four SATA drives attached to a hardware RAID adapter that uses a SAS bus connection. The RAID adapter has been configured to expose the drives as individual physical disks, that is, no striping, mirroring, or parity has been configured. One of these drives hosts the operating system, while the other three drives (our data drives) have yet to be brought online.

Figure 1: Test scenario used for this walkthrough.

Note:
Other names commonly used for iSCSI target servers are target servers, target portals, or portals.

Before we can provision iSCSI virtual disks on SRV-B, we first need to bring our three data drives online and create NTFS volumes on them. We could use the Disk Management snap-in of Computer Management to do this, but we're not going to do this because beginning with Windows Server 2012 the Disk Management snap-in is now considered deprecated. For more information about this, see this link.

Because of this, we'll instead use the File And Storage Services canvas of Server Manager to bring our three data drives online and create NTFS volumes on them. Begin by selecting the Disks page to display a list of the physical disks attached to SRV-B. Then right-click on each of the three data drives (indicated as Offline) and select Bring Online as shown here:

Figure 2: Bringing the three data drives online.

Once all three data drives are online, right-click on each of them in turn and select New Volume as shown here:

Figure 3: Creating a new volume on a data drive.

Proceed through the New Volume Wizard as shown below, formatting the volumes with NTFS and assigning X, Y and Z as their drive letters and DATA-1, DATA-2 and DATA-3 as their volume labels respectively:

Figure 4: Using the New Volume Wizard to create an NTFS volume on each data drive.

Once you've completed these steps, the three new NTFS volumes should be displayed on the Volumes page of the File And Storage Services canvas as shown here:

Figure 5: The three data drives each have NTFS volumes.

Provisioning iSCSI virtual disks using Server Manager

Now that SRV-B has been configured as the target server and its direct-attached storage has been formatted, we are ready to create virtual disks. A virtual disk behaves like a physical disk but has greater flexibility and scalability because it represents virtual storage instead of physical storage. Virtual disks are also commonly called logical unit numbers or LUNs, and you can think of a LUN as a collection of physical disks that are managed together as a single virtual unit of storage. Before you can create volumes on an iSCSI storage device, you first have to create iSCSI virtual disks. Once you've created an iSCSI virtual disk, you can then create one or more iSCSI volumes on that disk.

We'll start by creating an iSCSI virtual disk on SRV-B using Server Manager. Start by selecting New iSCSI Virtual Disk from the Tasks menu of the iSCSI Virtual Disk tile on the iSCSI page of the File And Storage Services canvas of Server Manager:

Let's pause for some terminology. If you recall, an iSCSI target server is a server or a storage device (like an iSCSI SAN) that can be used to provision iSCSI storage for your network. An iSCSI target on the other hand is a kind of object you create on a target server. The target allows iSCSI initiators to establish connections with iSCSI virtual disks on the target server. Be sure you understand the difference between targets and target servers. Specifically:

Each target server can have one or more targets.

Each target can be assigned to one or more virtual disks.

Each target can manage one or more connections from initiators.

Each initiator can connect to one or more targets and therefore to one or more virtual disks.

Since we're creating a new target on the target server, we need to give our new target a name and optional description:

The Add Initiator ID dialog that opens allows you to specify the initiator that will access our new iSCSI virtual disk in three ways. The first way we can specify the initiator is by typing the name of the server on which the initiator resides or browsing Active Directory to select the server. This is what I did in the next screenshot, but note that this only works for initiators on computers running Windows 8 or Windows Server 2012:

The second way we can specify the initiator is if it is listed in the list of cached initiators on the target server. But since this is the first iSCSI virtual disk we're creating, there are not yet any cached initiators.

The third way we can specify the initiator is by manually identifying the initiator by either its IQN, DNS name, IP address or MAC address.

Time to pause again for some terminology. IQN sands for iSCSI Qualified Name and is is a unique identifier for either a target or initiator. An initiator IQN has the following form:

In this walkthrough, our initiator IQN would be iqn.1991-05.com.microsoft:SRV-A.adatum.com and our target IQN would be iqn.1991-05.com.microsoft:SRV-B-target1-target. As you can see from the next screenshot, clicking OK in the Add Initiator ID dialog above results in the initiator IQN being displayed in the wizard:

As you can see from the next screenshot, the iSCSI page of the File And Storage Services canvas in Server Manager now displays the new iSCSI virtual disk and target we created:

Figure 18: A new iSCSI virtual disk and iSCSI target has been created.

Provisioning iSCSI virtual disks using Windows PowerShell

Let's now create a second iSCSI virtual disk and target by using Windows PowerShell. First, we'll use the New-IscsiVirtualDisk cmdlet to create a new iSCSI virtual disk of size 50 GB on X: drive and back the virtual disk with a VHD file named vdisk2.vhd:

Note that the LunMappings property for the new target has no value, which means an iSCSI virtual disk (that is, a LUN) has not yet been assigned to the target. To assign our new virtual disk to the new target we can use the -IscsiVirtualDiskTargetMapping cmdlet like this:

Conclusion

In the next and final article of this series we will configure the iSCSI initiator on our application server, discover targets on the target server, establish a connection between the application and target servers, and provision iSCSI volumes on the target server for use by the application server.

If you would like to read the other parts in this article series please go to:

Featured Links

Read Next

Author

Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows Server and cloud technologies who has written more than a thousand articles and has authored or been series editor for over 50 books for Microsoft Press. He is a twelve-time recipient of the Microsoft Most Valuable Professional (MVP) award in the technical category of Cloud and Datacenter Management.

Latest Podcast

Featured Freeware

Recommended

Follow Us

Configuring iSCSI Storage (Part 3)

TECHGENIX

TechGenix reaches millions of IT Professionals every month, and has set the standard for providing free technical content through its growing family of websites, empowering them with the answers and tools that are needed to set up, configure, maintain and enhance their networks.