FlashArray: Windows Server iSCSI Setup PowerShell script

[ NOTE: machine translation with the help of DeepL translator without additional proofreading and spell checking ]


A configuration of FlashArrays is "pretty straightforward". The connection to VMware hosts with Fibre Channel (FC) as well as Internet SCSI (iSCSI) is simple and quickly done without much "brainwork" - VMware does almost everything itself with the associated best practices. The connection to physical Windows hosts with FC is a bit more complicated. For Windows hosts with iSCSI, the host configuration is relatively complicated and involves research and some manual tasks for admins. A reason to address and finally solve the "pain" with a tool - an all-round carefree tool - with all best practices for the optimal iSCSI system configuration.

HERE GOES TO THE SCRIPT FOR FC/FibreChannel ENVIRONMENTS:

FlashArray: Windows Server FC Setup PowerShell script

The "Windows Server iSCSI Setup" PowerShell script does the job for you based on a few parameter requests:

  • Installation of the Pure Storage Powershell SDK v2 + Toolkit

  • Creation of the host object on the FlashArray(s) incl. host IQNs

  • Creating the host iSCSI target portal (single/multi VLAN configurations)

  • Connecting the iSCSI targets

  • Installation of the Windows Server Multipathing IO feature

  • Applying the MPIO/best practice parameters

  • Validate the Windows host against best practices (uses official Pure Storage Toolkit)

The script was developed for FlashArray standalone configurations (with two iSCSI interfaces per controller), but is also suitable for ActiveCluster configurations! To do this, simply run the script again on the host for the second FlashArray (with the adjusted-applicable variables).

Also the script is suitable for FlashArray configurations with more than two iSCSI interfaces per controller - a new execution is necessary.


Requirements


To use the PowerShell script, the following system requirements must be met.

To the host operating system:

  • 64-bit Windows Server 2012/2012R2/2016/2019

  • Windows PowerShell version 5.0

  • Microsoft .NET Framework 4.7.2 or .NET Core 2.1 or later

The following system requirements can be created with the help of the script (option 1):

  • Pure Storage PowerShell SDK v2 (requires .NET Framework - must be pre-installed/offline installer .NET 4.7.2 included in directory if applicable)

  • Pure Storage PowerShell Toolkit

To the FlashArray:

  • FlashArray with Purity REST API 2.2 (given as of Purity 6.0.0)

  • Host FlashArray TCP-IP connection via port 443/HTTPS

TIPP: to check the available API version of the FlashArray, open a web browser and access the web link:

https://<FQDN or IP address of FlashArrays>/api/api_version

The development environment/config (= base screenshots included in the blog).


As already mentioned, the script is suitable for single and multi-VLAN configurations:


Single VLAN configuration

You can see a simplified visualization (the SAN simplified with a switch) of a single VLAN configuration. There is one VLAN (e.g. VLAN112) with the host iSCSI & FlashArray ports within one network (10.100.112.0).

Multi VLAN configuration

To see a simplified visualization (the SAN simplified) of a multi-VLAN configuration. Two VLANs exist (e.g., VLAN 112 & 113) with host iSCSI port1/FlashArray-ct0/ct1.eth4 within VLAN 112 (10.100.112.0) and host iSCSI port2/FlashArray-ct0/ct1.eth5 within VLAN 113 (10.100.113.0).

A single VLAN configuration (common standard) is found in the test/development environment! The SAN layer is formed redundantly with two switches.


How To: Use Windows Server iSCSI Setup script


The script can be downloaded free of charge in the PUREFLASH.blog member area. The registration is done quickly, it is non-binding and revocable at any time. Beside the script there are already several other contents available for download. So it's worth to register: to the protected area.


I have packed the script together with the release notes into a ZIP file, this is 99 MB large due to screenshots and setup files (.NET). After successful unpacking you have to run the Windows PowerShell as administrator. This is mandatory to install the corresponding PowerShell modules.


Preparation/personal experience


Over the years, I have become accustomed to "neutering" the iSCSI interfaces to their actual functions for storage traffic as best as possible.


A meaningful naming of the interfaces is the be-all and end-all.

I also disable services on the interfaces that are not required, such as: "Client for Microsoft networks", "File and printer sharing for Microsoft networks" and the IPv6 protocol.

In the IPv4 protocol properties, I switch to "Append primary and connection-specific DNS suffixes" for DNS and disable DNS registration. NetBIOS over TCP/IP is also disabled.

HINT: Please read the release notes included in the ZIP!


Run script with administrator privileges


Before you get started, the Windows iSCSI service must be started (if not already done). You will find an empty iSCSI configuration for unconfigured-new Windows hosts.

The script is executed from the previously unpacked folder with all its contents as administrator. The seven menu options are used to access the individual configuration steps.


Option 1 - Install the Pure Storage PowerShell SDK v2 and Toolkit


With option 1, you install the Pure Storage PowerShell SDK v2 and import the Pure Storage PowerShell Toolkit into your PowerShell modules.

The installation of the SDK (MSI package) and the import of the toolkit is automatic. Before doing so, make sure that the system requirements (see above) are met.


The modules are mandatory for the further use of the individual script options!


After successful installation/import the PowerShell session/script must be terminated and executed again.


Option 2 - Creation of the host object on the FlashArray(s) including host IQNs.


Option 2 creates the Host object with its associated IQN (Windows Host) on the FlashArray. A REST API connection to the FlashArray is established. The connection is made through the VIP (virtual ip) of the FlashArray with a user having at least "storage admin" privileges.

After successful login, the available IQN(s) of the Windows host are displayed and you have to copy-paste the IQN(s) to be configured.

The host object is created with the respective computer name.

At the end of this script option, the connection to FlashArray REST API is automatically disconnected.

HINT: For ActiveCluster configurations, keep in mind that the steps described are also performed for the second system.


Option 3 - Creating the host iSCSI target portal (single/multi-VLAN configurations)


With option 3 you create the iSCSI target portal on the Windows host.

To create this, the respective iSCSI source/target ports are queried.


In single subnet/VLAN iSCSI environments, it would be sufficient to register a host iSCSI port on the FlashArray portal. However, since dual subnet/VLAN configurations are also frequently found at customers, both host iSCSI ports must be registered at the FlashArray interfaces of a controller in the script here.

First the ip addresses of the Windows host iSCSI interfaces must be specified.

Then the FlashArray iSCSI IPs of a FlashArray controller must be specified.

Two iSCSI target portals are created for the search.

HINT: For ActiveCluster configurations, keep in mind that the steps described are also performed for the second system.


Option 4 - Connect the iSCSI targets


With option 4 they establish the connection/sessions from Windows Host to the FlashArray.

First, the IPs of the Windows Host iSCSI interfaces must be specified.

Then, all FlashArray iSCSI IPs from the FlashArray controllers must be specified.

A REST API connection to the FlashArray must be established. The connection is established using the virtual IP address (vip) of the FlashArray. A FlashArray user (local or remote) with at least "storage admin" privileges is required for successful deployment of the script.


A dummy volume is temporarily created on the FlashArray with the size of 1MB (purevol create --size 1M). This is mandatory, otherwise the sessions cannot be established.

The dummy volume is connected to the host object (purevol connect).


The iSCSI sessions between the Windows host and the FlashArray are created.

For each Windows host iSCSI port a redundant connection to one FlashArray iSCSI port per controller is established, resulting in a total of 4 paths (8 paths for ActiveCluster environments).


The dummy volume is disconnected from the host object (purevol disconnect).

The dummy volume is irrevocably deleted (eradicate) from the FlashArray (purevol destroy/eradicate).

You can now see 4 active sessions (please read the notes at the end of the article).

At the end of this script option, an automatic disconnect to the FlashArray REST API occurs.

HINT: For ActiveCluster configurations, keep in mind that the steps described are also performed for the second system.


Option 5 - Installing Windows Server Multipath-IO Features


Option 5 installs the Windows Server Multipath IO feature.

After the successful feature installation, a server restart is required!

However, the server restart can also be performed after executing script option 6.


Option 6 - Apply MPIO/Best Practice Parameters


With option 6 you finally complete the configuration.

Corresponding best-practice settings are set:

  • Adjust MPIO device setting: PURE - FlashArray (New-MSDSMSupporedHW)

  • Adjustment of the setting: Support for iSCSI devices (Enable-MSDSMAutomaticClaim)

  • Adjust storage settings to: OnlineAll (Set-StorageSetting)

  • Adjustment of MPIO Load-Balancing Policy to: Round Robin (Set-MSDSMGlobalDefaultLoadBalancePolicy)

  • Adjust path recovery to: active (Set-MPIOSetting -CustomPathRecovery)

  • Adjustment of the path recovery time to: 20 seconds (Set-MPIOSetting -NewPathRecoveryInterval)

  • Adjust "physical device object" PDO to: 30 seconds (Set-MPIOSetting -NewPDORemovePeriod)

  • Adjust disk timeout value to: 60 seconds (Set-MPIOSetting -NewDiskTimeout)

  • Adjust path verification to: active (Set-MPIOSetting -NewPathVerificationState)

After the successful parameter adjustments a server restart is required at the latest!

The previously made configurations can be seen in the GUI.


Option 7 - Validate Windows host against best practices (uses official Pure Storage Toolkit)


This runs the official "Pure Storage Windows Server Best Practices Analyzer" and checks for an optimal server configuration.


An error may appear during the best practices check in the "Multipath-IO Verification" step:

"FAILED: Microsoft Device Specific Module (MSDSM) is configured for ..." - this is as expected.

The Best Practice Analyzer is optimized for FC configurations and does not recognize the necessary defaults here with the iSCSI configuration.

The step performed in option 7:

  • Adjustment of the setting: Support for iSCSI devices (Enable-MSDSMAutomaticClaim)

causes this error message.

However, this step is according to the official "Configuring Multipath-IO for Windows Server 2012/2012R2/2016/2019" specifications in the Pure Technical Service Portal.

HINT: the script and its individual configuration steps contain personal experience values, which have also been confirmed by official Pure Storage system engineers. Pure Storage officially recommends:

This is also a justified recommendation in principle, but can also have negative effects in complex environments (increased number of ports = increased number of paths).

The script generates in the standard - with 2 iSCSI ports per controller - always 4 sessions per host with two iSCSI host