26

iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies [email protected]

Embed Size (px)

Citation preview

Page 1: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com
Page 2: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI Management and Tuning

Shiv RajpalSenior Development LeadDevice and Storage Technologies

[email protected]

Page 3: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI Management and Tuning

iSCSI Management and Tuning

• Agenda:

• Architecture overview

• iSCSI initiator management options

• Performance enhancements

• Error recovery in Microsoft initiator

Page 4: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Architecture

Architecture

MS Initiator Service

iSCSI CLI iSCSI GUI SAN Mgmt

WMI

MS iSCSI Initiator

NIC

Miniport driver

iSCSI HBA

Bus Driver + miniport

Multifunction Card

Hardware

IHV/ISV

Microsoft

Page 5: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI Management

iSCSI Management

WMI Interfaces to Enable Enterprise SAN

Management Applications

iSCSI CLI

iSCSI GUI

Page 6: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Discovery

Discovery

Page 7: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Targets

Targets

Page 8: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Quick Connect

Quick Connect

Page 9: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Devices-I

Devices-I

Page 10: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Devices-II

Devices-II

Page 11: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Configuration

Configuration

Page 12: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI CLI: Discovery

• AddTarget: Manually configure a target and optionally persist that target

• AddTargetPortal: iSCSI initiator service performs a SendTargets operation to each target portal added.

• AddiSNSServer: iSNS servers that the iSCSI initiator service queries to discover targets

Page 13: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI CLI: Target Operation

• LoginTarget: Logs into a target

• PersistentLoginTarget: Establishes a persistent login to a target

• LogoutTarget: Logs out from a target

Page 14: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI CLI: Informational

• TargetInfo: Displays details about the target. Example – discovery mechanism used to discover the target.

• ListPersistentTargets: Displays the list of persistent targets configured for all initiators.

• ListiSNSServers: Displays the list of iSNS server addresses that are persisted by the iSCSI Initiator service.

Page 15: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com
Page 16: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI CLI: Sample Batch file.@ECHO OFFSETLOCAL setlocal EnableDelayedExpansion

REM - Batch file to do a quick connect to iSCSi Target.REM - 1. First add portal for the IP address that has been entered.REM - 2. List Targets.REM - 3. If only one Target, then logon.REM - 4. Mark it persistent.REM - 5. Done.

SET ipaddress=%1echo "Trying to add target %1 for discovery"

iscsicli QAddTargetPortal %ipaddress%REM – Find out the number of Targets discovered for the portal address

SET _count=0FOR /F "usebackq skip=1" %%G IN (`iscsicli ListTargets`) DO ( SET _cmp=%%G SET _result=!_Cmp:~0,4!

REM - Get a valid IQN Name. IF !_RESULT!==iqn. ( set TargetName=!_cmp! SET /a _count = _count + 1 ))

REM - Check if there is only one target.if !_count! equ 1 ( echo "Found A Target - %TargetName%: Attempt to login" iscsicli QLoginTarget %TargetName% Echo “Mark the target as a persistent target” iscsicli PersistentLoginTarget %TargetName% * * * * * * * * * * * * * * * * ) ELSE ( echo "Did not find a single Target to login")

Page 17: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI CLI: Managing remotely

iSCSI CLI: Managing remotely• Windows Remote Shell

• Server to be managed:

• winrm quickconfig

• Remote management server:

• winrs r:<server name> iscsicli –help

• Referencehttp://msdn.microsoft.com/en-us/library/aa384426(VS.85).aspx

• Psexec

• psexec.exe <Server name> iscsicli –help

• Referencehttp://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

Page 18: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Windows 7: iSCSI Performance

Windows 7: iSCSI Performance

• MSISCSI driver updated to utilize DPC redirection feature of storport

• Tunable to Disable Nagle Algorithm

• HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\<Instance Number>\Parameters\iSCSIDisableNagle

• Utilize CPU instruction to compute iSCSI digest (including Intel Nahalem)

• 10G – Wire Speed!

Page 19: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI : Points Of Failure

iSCSI : Points Of Failure

Page 20: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI : High Availability Options

iSCSI : High Availability Options

iSCSI Session #1

Connection#1

iSCSI Session #2

Connection #2

Disk #1 Disk #2

Pseudo Disk

iSCSI Session

Connection#1

Connection #2

Disk

MPIOMCS

Page 21: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI Error Recovery: Hierarchal Resets

iSCSI Error Recovery: Hierarchal Resets

Reset Result

Reset Result

5 Consecutive Resets

Session Recovery

Timeout

Timeout/Fail

Target Warm Reset

Fail

OKDone

OKDone

LUN Reset

I/O Timeout

Page 22: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI Error Recovery

iSCSI Error Recovery

Pause I/O Queue

Pending Commands lost

Initiate iSCSI Login

Login Status

LUN Ready

I/O Requests (SRB)

Using MPIO

No

Pause I/O Queue/Retry I/O

No

Yes Start I/O

YesFail I/O

YesFail I/O

Connection Drop Detected

Re-Enumerate Devices

Success

FailTime > X

No

Time = Disconnect timeX = MaxRequestHoldTime

Page 23: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

iSCSI Error Recovery: Tunable

iSCSI Error Recovery: Tunable• MaxRequestHoldTime

• Max time I/O will be queued when connection lost (60S)

• DelayBetweenReconnect

• Delay between each login attempt (1S)

• LinkDownTime

• Queue pause time when connection loss detected (15S)

• MaxConnectionRetries

• Maximum number of connection retry attempts (-1 = infinite)

• TCPConnectTime

• Timeout value while requesting a TCP connection (15S)

Page 24: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Call To Action

Call To Action• Evaluate extensibility options in management interfaces

• GUI extension

• WMI

• Evaluate tuneables to optimize for your storage arrays

• Test your arrays and iSCSI devices with current WLK

Page 25: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Resources

Resources• Web resources

• Microsoft Storage Technologies – iSCSIhttp://www.microsoft.com/windowsserver2003/technologies/storage/iscsi/default.mspx

• iSCSI User Guidehttp://download.microsoft.com/download/a/e/9/ae91dea1-66d9-417c-ade4-92d824b871af/uguide.doc

• Documentation on MSDN

• iSCSI WMI Classes http://msdn.microsoft.com/en-us/library/ms807120.aspx

• GUI property page expansionhttp://msdn.microsoft.com/en-us/library/bb776850(VS.85).aspx#work

• Implementation questions on initiator – [email protected]

Page 26: iSCSI Management and Tuning Shiv Rajpal Senior Development Lead Device and Storage Technologies shivr@microsoft.com

Related Sessions

Related Sessions

Session Day / Time

Developing Highly Available Multipath Solutions and Device-Specific Modules Tues. 5:15-6:15 andWed. 1:30-2:30

Storport Smorgasboard Tues. 4-5 andWed. 11-12

iSCSI Management and Tuning Tues. 4-5