Tag Archives: iSCSI

Building a Hyper-V Cluster – SCVMM Configuring SMI-S and SMB3 Storage – Part 3/6

SCVMM Configuring SMI-S and SMB3 Storage

As of Windows Server 2012, Microsoft iSCSI Target Server is a server role that enables the server to function as a storage device.

With VMM in System Center 2012 R2, you can manage an iSCSI Target Server running any of several operating system versions:

• With Windows Server 2012 on the iSCSI Target Server: You must first install the necessary SMI-S provider on the iSCSI Target Server. The provider is included in VMM media at   \amd64\Setup\msi\iSCSITargetSMISProvider.msi

• Starting with Windows Server 2012 R2 on the iSCSI Target Server: You only need to install the iSCSI Target Server Role Service and the iSCSI Target Storage Provider Role Service as shown below.

iSCSITargetInstal
The SMI-S provider follows an “embedded” provider model, where the provider is installed on the iSCSI Target Server computer. The SMI-S provider is WMI-based and manages the iSCSI Target Server by using the iSCSI Target WMI provider.
To install and manage the iSCSI Target Server (2012 R2) with VMM use the following steps:

1. Install the iSCSI Target Server and iSCSI Target Storage Provider as shown above on the server that will become the iSCSI target.
2. Using VMM, on the fabric workspace from the storage area, right-click on providers and add a storage device.
3. Choose the option “SAN and NAS devices discovered and managed by a SMI-S provider”. Click Next.
4. Choose the protocol “SMI-S WMI”, enter the name of the server with the iSCSI target, and choose a Run-AS account.  Click next.
5. The server entered will be scanned, providing the options to choose which local storage devices should be available for presentation by VMM.
6. Once the provider is installed, create LUNs, allocated them to host groups, and add storage to servers as demonstrated in the video.
We can also manage SMB 3.0 shares using VMM.  Windows Server 2012 and 2012 R2 both support SMB 3.0 and can be managed from SCVMM.  To manage SMB shares with VMM follow the steps below:

1. Using VMM, on the fabric workspace from the storage area, right-click on providers and add a storage device.
2. Choose the option “Windows based file server”.  Click Next.
3. Enter the name of the server that you will be managing and using for SMB 3.0 sharing.
4. Complete the wizard to complete adding the provider.
5. Once the provider is configured, add shares to VMM and allocated them to Hyper-V hosts as demonstrated in the video.

Check out the other videos in this series!

Building a Hyper-V Cluster – iSCSI Storage – Part 3/5

Configuring iSCSI storage for a Hyper-V Cluster

In this video we use iSCSI target server built in to Server 2012R2 to present shared storage to our cluster nodes.

Install and Configure iSCSI Target

We must first install the FS-iSCSITarget-Server feature. Once this is installed we will create a target on our storage server. Next we will create virtual disks for the witness disk and CSV. These virtual disks will be attached to the target and presented to our cluster nodes as LUNs. Finally, we will configure the target to allow access from the IQNs of our hyper-v host nodes.  We can discover the IQN of the hyper-v hosts by running the command: (Get-InitiatorPort).NodeAddress on the cluster nodes.

 PowerShell Commands

#Install target server
Install-WindowsFeature -Name FS-iSCSITarget-Server, iSCSITarget-VSS-VDS -IncludeManagementTools -Restart
#create target
New-IscsiServerTarget -TargetName HyperVCluster
New-IscsiVirtualDisk -Path c:\HVC1-W.vhdx -SizeBytes 1GB
New-IscsiVirtualDisk -Path c:\HVC1-CSV.vhdx -SizeBytes 50GB
Add-IscsiVirtualDiskTargetMapping -TargetName HyperVCluster -Path C:\HVC1-W.vhdx
Add-IscsiVirtualDiskTargetMapping -TargetName HyperVCluster -Path C:\HVC1-CSV.vhdx
#(Get-InitiatorPort).NodeAddress
#Allow nodes to access target LUNs
Set-IscsiServerTarget -TargetName HyperVCluster -InitiatorId @("IQN:iqn.1991-05.com.microsoft:2012r2-node1.demo.lcl","IQN:iqn.1991-05.com.microsoft:2012r2-node2.demo.lcl")

Connect Nodes to iSCSI Target

Once the target is created and configured, we need to attach the iSCSI initiator in each node to the storage. We will use MPIO to ensure best performance and availability of storage.  When we enable the MS DSM to claim all iSCSI LUNs we must reboot the node for the setting to take affect. MPIO is utilized by creating a persistent connection to the target for each data NIC on the target server and from all iSCSI initiator NICs on our hyper-v server.  Because our hyper-v servers are using converged networking, we only have 1 iSCSI NIC.  In our example resiliency is provided by the LBFO team we created in the last video.

PowerShell Commands

Set-Service -Name msiscsi -StartupType Automatic
Start-Service msiscsi
#reboot requres after claim
Enable-MSDSMAutomaticClaim -BusType iSCSI
Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
New-IscsiTargetPortal –TargetPortalAddress 192.168.1.107
$target = Get-IscsiTarget -NodeAddress *HyperVCluster*
$target| Connect-IscsiTarget -IsPersistent $true -IsMultipathEnabled $true -InitiatorPortalAddress 192.168.1.21 -TargetPortalAddress 10.0.1.10
$target| Connect-IscsiTarget -IsPersistent $true -IsMultipathEnabled $true -InitiatorPortalAddress 192.168.1.21 -TargetPortalAddress 10.0.1.11

Prepare the LUNs for use in the Cluster

Finally, once storage is available from both nodes, we must online, initialize and format the LUNs so that they will be ready for import into the cluster. This is only done from one node in the cluster as cluster disks must only ever be online on one node at a time.

 PowerShell Commands

#Prep Drives from one node
$Disk = get-disk|?{($_.size -eq 1GB) -or ($_.size -eq 50GB)}
$disk|Initialize-Disk -PartitionStyle GPT
$disk|New-Partition -UseMaximumSize -AssignDriveLetter| Format-Volume -Confirm:$false

Resources

What’s New for iSCSI Target Server in Windows Server 2012 R2
Storage Team Blog – iSCSI Target Server in Windows Server 2012 R2
Storage Team Blog – iSCSI Target Storage (VDS/VSS) Provider
iSCSI Target Cmdlets in Windows PowerShell
MultiPath I/O (MPIO) Cmdlets in Windows PowerShell
Bruce Langworthy – MSFT: Managing iSCSI Initiator connections with Windows PowerShell on Windows Server 2012

Check out the other post in this series!