次の方法で共有


What’s New R2?: iSCSI Target Server updates – Part 1: Remote Storage on the Cheap!

In today’s virtualized computing world where we are eeking out every bit of performance and optimization that we can to save money and increase efficiency, one of the areas that IT is focusing on is how to deploy servers as quickly as possible. Whether this be for a new project or to create a child domain for a new division, the faster we can deploy the servers and have them operational, the faster we can have entire departments up an running.

The iSCSI Target Server functionality in Windows Server 2012 R2 can help us achieve this.

iSCSI Target Server enables you to network boot multiple computers from a single operating system image that is stored in a centralized location. This improves efficiency, manageability, availability, and security. iSCSI Target Server can boot hundreds of computers by using a single operating system image. in addition to this great feature, there are some other enhancements given to us with an update with Windows Server 2012 R2 -

image

In this article, I am going to show you how to leverage the iSCSI Target Server functionality to quickly deploy a large number of Windows Server 2012 R2 Servers. I will not be diving deeply into the technical aspects for this though. if you want deeper information on this, there are some great blogs posts I will be referencing at the bottom of this article.

Let’s get Started!!   Here is what we are going to do -

Enable iSCSI Target

Configuring the iSCSI Initiator to Logon to the iSCSI Target

Format the iSCSI Disk and use it for storage

(I will also try to show the PowerShell commands that do each of the steps we perform in the GUI)

Enable iSCSI Target

From the Server Manager on Windows Server 2012 R2, select the “Add roles and features” option - The iSCSI Target Server is available as a role service under the File and Storage Services role in Server Manager -

image

Select the iSCSI Target Server. This will provide a pop-up for any additional roles or services that have to be enabled to support the iSCSI Target Server -

*** Do this with PowerShell ! *** - Add-WindowsFeature FS-iSCSITarget-Server

image

Once you complete the wizard, in Server Manager, verify that you have the File and Storage Services management pane and drill to the iSCSI management section -

image

As we see here, everything looks to be in place. Now we have to create some shared storage. To do this we will -

Create an iSCSI LUN

On the iSCSI management pane, select “To create an iSCSI virtual disk, start the New iSCSI Virtual Disk Wizard” link near the center of the window. This will launch the iSCSI Virtual Disk wizard. The first thing we do is select the physical drive location where we will store the iSCSI LUN. If you want to use a custom path, select the button at the bottom of the page - 

image

Next, we provide a name for our iSCSI Virtual Disk. As we type, notice that the wizard will automatically fill in the path for us. If you don’t like this path you will have to return to the previous page and select the “Type custom path” button at the bottom of the page -

image

Next, we are asked to specify the size of the iSCSI Virtual Disk. In Windows Server 2012 R2, we have some new options that deserve some attention -

Fixed SizePros: Better performance for high disk I/O applications       Cons: immediately creates a .VHDX file of the size specified

Dynamic ExpandingPros: minimal disc space consumed at creation      Cons: reduced performance for high disk I/O applications

Differencing – Parent-Child relationship. Allows use of a parent disc that remains unchanged and child disks that build upon the parent.

For our demo, I am going to select Fixed -

image

*** Do this with PowerShell ! *** - New-IscsiVirtualDisk h:\iSCSIVirtualDisks\iSCSITarget.vhdx –size 150GB

The next stage of the wizards walks us through assigning the virtual disc to an iSCSI Target. In my case, I do not have any existing targets, so I have to create a new one -

image

Next, we give the iSCSI Target a name -

image

Clicking “Add” on this next page will let us add specific iSCSI initiators or browse for the iSCSI Initiator. Using the default “Query initiator computer…” option, we can browse for our server name in Active Directory and then let the wizard create the IQN for us (IQN = iSCSI Qualifier Name)

image

Next, let’s provide some security/authentication for this iSCSI initiator connection. Here we are prompted for the type of CHAP authentication we wish to use. We can authenticate in bound initiator connections and/or have the initiator authenticate the target.

Important – There is no way to retrieve this information once it has been set. If you lose this information, you will have to reset it. Also, you cannot use the same password for CHAP and Reverse CHAP

image

All Done!   Now we have the summary screen. Just verify that you have everything in order then Create!

image

You will see a nice flow of the process as well. In may case it only took about 5 seconds to create so don’t look away if you want to see this screen!

image

Since I created mine as a Fixed Disk, the system will begin allocating the disk and zeroing it out in the background. You can check the progress of this from File and Storage Services –> iSCSI page -

image

We will need to wait for this process to complete before we move on to the next phase -

Configuring the iSCSI Initiator to Logon to the iSCSI Target

Note – The iSCSI Target and iSCSI Initiator should be two different machines. I am using a single machine for ease of capturing screen shots.

If you are using Windows Server 2012 R2, the iSCSI Initiator is built-in. You don’t even have to add it in as a role of feature. Simply select it from Server Manager and the Tools drop down -

image

If this is the first time you have chosen this option, you will receive a pop-up asking you to confirm the start of the iSCSI Initiator Service. Select “Yes” to continue -

image

After a few seconds, you will see the iSCSI Initiator Properties screen. Here we can provide or discover all the information to connect to our previously created Target. if you know all of the information, you can provide it on the Targets tab. Otherwise, use the Discovery Tab to find all available targets you can connect to. On my Discovery Tab, I am clicking Discover Portal and providing the name of the iSCSI Target Server we worked with earlier -

image

After clicking okay, I am back at the Discovery Tab and I see my server listed -

image

Next, click on the Targets Tab, and we see all of the  discovered targets at the IP address we used on the Discovery Tab. In my case I was doing some troubleshooting and alternate configurations so I have two targets to select from.

image

Choose the appropriate Target, then click the Connect button -

image

If you configured the selected target with CHAP authentication, you will need to select the Advanced button to provide the appropriate credentials. Once you have provide any credentials, click OK and then you will return to the Targets Tab where you should see the selected iSCSI Target listed as “Connected”

image

We now have an iSCSI initiator connected to an iSCSI Target!  Next up -

Format the iSCSI Disk and use it for storage

This iSCSI target will show up as a disk under File and Storage Services –> Volumes –> Disks

image

From here we can format, assign a drive letter and begin using it as we would any other kind of disk. It is actually very simple to do this from within the Volumes section of the File and Storage Services manager. This will launch the New Volume wizard that will walk you through creating the volume. When complete, you will have a new volume that you can identify as being an iSCSI disk by looking at the Bus Type Column in File and Storage Services –> Volumes –> Disks -

image

From here, check out the disk from Explorer and verify you can access your disk by adding and removing files to it.

image

And that’s it!   We have now shown how to use the iSCSI Target and iSCSI Initiator within Windows to use iSCSI for remote remote data storage and access.

Part 2 will be showing how to use a similar process to boot a diskless machine directly from an image stored as an iSCSI Target from and how this can be used for mass server deployment while reducing storage and power requirements.

What’s New R2?: iSCSI Target Server updates – Part 2: Fast, Easy Mass Server Deployments

Also – If you would like to see more PowerShell based configuration for iSCSI work, please check out Keith Mayer’s Blog Post

Step-by-Step: Speaking iSCSI with Windows Server 2012 and Hyper-V - Become a Virtualization Expert in 20 Days!

-Cheers!

Comments

  • Anonymous
    October 31, 2013
    The comment has been removed
  • Anonymous
    October 31, 2013
    SMB 3.0 is clearly a way Microsoft wants to feed shared storage to clusters. SMB 3.0 is cached on both client and servers, supports SMB Multichannel (poor man's MPIO analog) and can be rebalanced.