Using Qutil to set Windows Registries on a Windows Host


Last modified date: 2019-12-11

Overview

Qutil is a PowerShell script that sets the required Windows registry to ensure that Windows host correctly handles the storage system behaviors for QNAP ES NAS. In addition, users can select which QNAP LUNs need to be set to optimized load balance policy by using Qutil.

Basic Specifications:

Item Description
Supported Firmwares QTS: 4.2.x and above
QES: All versions
Supported OS Windows Server 2008 and above
Multiple Language English Only

Load Balance Policies

You can choose from the following Microsoft Multipath I/O (MPIO) policies:
Fail Over Only - Policy that does not perform load balancing. This policy uses a single active path, and the rest of the paths are standby paths. The active path is used for sending all I/O. If the active path fails, then one of the standby paths is used. When the path that failed is reactivated or reconnected, the standby path that was activated returns to standby.
Round Robin - Load balancing policy that allows the Device Specific Module (DSM) to use all available paths for MPIO in a balanced way. This is the default policy that is chosen when the storage controller follows the active-active model and the management application does not specifically choose a load-balancing policy.
Round Robin with Subset - Load balancing policy that allows the application to specify a set of paths to be used in a round robin fashion, and with a set of standby paths. The DSM uses paths from a primary pool of paths for processing requests as long as at least one of the paths is available. The DSM uses a standby path only when all the primary paths fail. For example, given 4 paths: A, B, C, and D, paths A, B, and C are listed as primary paths and D is the standby path. The DSM chooses a path from A, B, and C in round robin fashion as long as at least one of them is available. If all three paths fail, the DSM uses D, the standby path. If paths A, B, or C become available, the DSM stops using path D and switches to the available paths among A, B, and C.
Least Queue Depth - Load balancing policy that sends I/O down the path with the fewest currently outstanding I/O requests. For example, consider that there is one I/O that is sent to LUN 1 on Path 1, and the other I/O is sent to LUN 2 on Path 1. The cumulative outstanding I/O on Path 1 is 2, and on Path 2, it is 0. Therefore, the next I/O for either LUN will process on Path 2.
Weighted Paths - Load balancing policy that assigns a weight to each path. The weight indicates the relative priority of a given path. The larger the number, the lower ranked the priority. The DSM chooses the least-weighted path from among the available paths.
Least Blocks - Load balancing policy that sends I/O down the path with the least number of data blocks currently being processed. For example, consider that there are two I/Os: one is 10 bytes and the other is 20 bytes. Both are in process on Path 1, and both have completed Path 2. The cumulative outstanding amount of I/O on Path 1 is 30 bytes. On Path 2, it is 0. Therefore, the next I/O will process on Path 2.

Configure iSCSI initiator MPIO

  1. Click “Start”, type “iSCSI” in Start Search, and then under Programs, click “iSCSI Initiator”.
  2. If this is the first time that you have launched Microsoft iSCSI Initiator, you receive a prompt that says the Microsoft iSCSI service is not running. You must start the service for Microsoft iSCSI Initiator to run correctly. Click “Yes” to start the service. The Microsoft iSCSI Initiator Properties Window opens.
  3. Click the “Discovery” tab. To add a target portal, click “Discover Portal”, and then in the “Discover Target Portal” dialog box, type the IP address or name of the target portal to connect to. We will add the IP addresses of the dual controller’s data ports (as opposed to the administration ports) that belong to the same subnet. Keep the TCP port to 3260 as the default.
  4. The available iSCSI targets and their status will then be shown under the "Targets" tab. Select the target you wish to connect to and click "Connect ".
  5. Select “Enable multi-path” and click “Advanced”.
  6. On the “Advanced Settings” window, select “Microsoft iSCSI Initiator” for “Local adapter”. Then select an IP address from “Initiator IP” drop-down list and “Target portal IP” drop-down list respectively. Please ensure the Initiator IP and Target portal IP are in the same subnet.
  7. Click “OK” to close the window.
  8. It displays that one of these iSCSI targets is successfully connected. Select this target and then click “Properties”.
  9. On the “Sessions” tab, select “Add session”.
  10. Select “Enable multi-path” , and then click “Advanced…”.
  11. Add the IP address of the other data port that belongs to a different subnet. Please ensure the Initiator IP and Target portal IP are in the same subnet. Click “OK” to close the window.
  12. You should see another session was added. Click “OK” to close the window.
  13. Repeat steps 3 to steps 12 to set up the other iSCSI target with MPIO.
  14. After configuring both targets with MPIO, add the iSCSI volume and/or device to be persistently bound to the iSCSI service. It ensures that the iSCSI Initiator service will not complete initialization until all persistently bound volumes and devices are available to the computer. Select “Volumes and Devices” tab on the iSCSI Initiator Properties window, and then click “Auto Configure” to automatically configure all available devices. You should see a new volume named as “mpio#disk………….” in the Volume list. Click “OK” to close the window.

Registry values set by Qutil

The Qutil requires certain registry settings to ensure the Windows host correctly handles the storage system behavior. Those settings affect how the Windows host responds to a delay or loss of data. The particular values have been selected to ensure that the Windows host correctly handles events such as the failover of one controller in the storage system to its partner controller.

The following values are set by the Qutil. All values are decimal unless otherwise noted. HKLM is the abbreviation for HKEY_LOCAL_MACHINE.

Registry key (QNAP) Value
HKLM\SYSTEM\CurrentControlSet\Services\disk \TimeOutValue 60
HKLM\SYSTEM\CurrentControlSet\Control\Class\
{4D36E97B-E325-11CE-BFC1-08002BE10318}\0001(?)\Parameters\DelayBetweenReconnect
10
HKLM\SYSTEM\CurrentControlSet\Control\Class\
{4D36E97B-E325-11CE-BFC1-08002BE10318}\0001(?)\Parameters\LinkDownTime
300
HKLM\SYSTEM\CurrentControlSet\Control\Class\
{4D36E97B-E325-11CE-BFC1-08002BE10318}\0001(?)\Parameters\MaxRequestHoldTime
300
HKLM\SYSTEM\CurrentControlSet\Control\Class\
{4D36E97B-E325-11CE-BFC1-08002BE10318}\0001(?)\Parameters\SrbTimeoutDelta
300
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\PathVerificationPeriod 30
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\PDORemovePeriod 600
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\RetryCount 3
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\RetryInterval 1
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters\DsmSupportedDeviceList "QNAP    iSCSI Storage   "
HKLM\SYSTEM\CurrentControlSet\Control\MPDEV \MPIOSupportedDeviceList "QNAP    iSCSI Storage   "
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\DurableHandleV2TimeoutInSecond 240
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\ExtendedSessTimeout 960
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\SessTimeout 240

                               

Registry key (NetApp) Value
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters \DsmMaximumRetryTimeDuringStateTransition 120
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters\ DsmMaximumStateTransitionTime 120
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters\DsmSupportedDeviceList   "XXX      "
HKLM\SYSTEM\CurrentControlSet\Control\Class\ {iSCSI_driver_GUID}\ instance_ID\Parameters \IPSecConfigTimeout 60
HKLM\SYSTEM\CurrentControlSet\Control\Class\ {iSCSI_driver_GUID}\ instance_ID\Parameters \LinkDownTime 30
HKLM\SYSTEM\CurrentControlSet\Services\ClusDisk \Parameters\ManageDisksOnSystemBuses 1
HKLM\SYSTEM\CurrentControlSet\Control\Class\ {iSCSI_driver_GUID}\ instance_ID\Parameters \MaxRequestHoldTime 60
HKLM\SYSTEM\CurrentControlSet\Control\MPDEV \MPIOSupportedDeviceList "xxxx   "
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\PathRecoveryInterval 40
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\PathVerifyEnabled 0
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters\PathVerifyEnabled 0
HKLM\SYSTEM\CurrentControlSet\Services\msiscdsm \Parameters\PathVerifyEnabled 0
HKLM\SYSTEM\CurrentControlSet\Services\vnetapp \Parameters\PathVerifyEnabled 0
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\PDORemovePeriod 130
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters\PDORemovePeriod 130
HKLM\SYSTEM\CurrentControlSet\Services\msiscdsm \Parameters\PDORemovePeriod 130
HKLM\SYSTEM\CurrentControlSet\Services\vnetapp \Parameters\PDORemovePeriod 130
HKLM\SYSTEM\CurrentControlSet\Services\ontapdsm \Parameters\ReservationTimeout 30
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\RetryCount 6
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters\RetryCount 6
HKLM\SYSTEM\CurrentControlSet\Services\msiscdsm \Parameters\RetryCount 6
HKLM\SYSTEM\CurrentControlSet\Services\vnetapp \Parameters\RetryCount 6
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\RetryInterval 1
HKLM\SYSTEM\CurrentControlSet\Services\msdsm \Parameters\RetryInterval 1
HKLM\SYSTEM\CurrentControlSet\Services\msiscdsm \Parameters\RetryInterval 1
HKLM\SYSTEM\CurrentControlSet\Services\vnetapp \Parameters\RetryInterval 1
HKLM\SYSTEM\CurrentControlSet\Services\disk \TimeOutValue 60
HKLM\SYSTEM\CurrentControlSet\Services\mpio \Parameters\UseCustomPathRecoveryInterval 1

DsmMaximumStateTransitionTime and DsmMaximumRetryTimeDuringStateTransition settings

The DsmMaximumStateTransitionTime and the DsmMaximumRetryTimeDuringStateTransition settings specify the time that the Windows Server 2008, Windows Server 2008 R2, or Windows Server 2012 msdsm waits for an ALUA path transition before returning an I/O error to the layer above it in the stack.

The DsmMaximumStateTransitionTime and DsmMaximumRetryTimeDuringStateTransition settings allow time for a path state transition to complete after a storage system failover or other event. These settings are used for MPIO configurations on Windows Server 2008, Windows Server 2008 R2, and Windows Server 2012.

DsmSupportedDeviceList setting

The DsmSupportedDeviceList setting specifies that a DSM should claim storage devices with the specified vendor identifier and product identifier (VID/PID).

This setting is set for the msdsm included in Windows Server 2008, Windows Server 2008 R2, and Windows Server 2012. The msdsm always gives priority to other DSMs. If another DSM is installed and configured to claim all LUNs with a specified VID/PID, that other DSM would handle the specified LUNs, even though the msdsm has this parameter set.

IPSecConfigTimeout setting

The IPSecConfigTimeout parameter specifies how long the iSCSI initiator waits for the discovery service to configure or release ipsec for an iSCSI connection.

This value enables the initiator service to start correctly on slow-booting systems that use CHAP.

LinkDownTime setting

For iSCSI only, the LinkDownTime setting specifies the maximum time in seconds that requests are held in the device queue and retried if the connection to the target is lost.

If MPIO is installed, this value is used. If not, MaxRequestHoldTime is used instead.

ManageDisksOnSystemBuses setting

The ManageDisksOnSystemBuses parameter is used by SAN-booted systems to ensure that the startup disk, pagefile disks, and cluster disks are all on the same SAN fabric.

For detailed information about the ManageDisksOnSystemBuses parameter, see Microsoft Support article 886569

MaxRequestHoldTime setting

The MaxRequestHoldTime setting specifies the maximum time in seconds that requests are queued if connection to the target is lost and the connection is being retried.

After this hold period, requests are failed with "error no device" and the disk is removed from the system. The supported setting enables the connection to survive the maximum expected storage failover time.

MPIOSupportedDeviceList

The MPIOSupportedDeviceList setting specifies that the Windows MPIO component should claim storage devices with the specified vendor identifier and product identifier (VID/PID).

This parameter does not determine which DSM handles the claimed devices; the DsmSupportedDeviceList setting specifies the DSM to use.

PathRecoveryInterval setting

The PathRecoveryInterval setting specifies how long in seconds the MPIO component waits before retrying a lost path.

The PathRecoveryInterval setting causes the MPIO component to try to recover a lost path that had a transient error before it decides the disk device is no longer available.

Note that this parameter affects all DSMs on the system.

PathVerifyEnabled setting

The PathVerifyEnabled parameter specifies whether the Windows MPIO driver periodically requests that the DSM check its paths.

Note that this parameter affects all DSMs on the system.

PDORemovePeriod setting

This parameter specifies the amount of time that the multipath pseudo-LUN stays in system memory after all paths to the device are lost.

RetryCount setting

The RetryCount parameter specifies the number of times the current path to a LUN is retried before failing over to an alternate path.

The RetryCount setting enables recovery from a transient path problem. If the path is not recovered after the specified number of retries, it is probably a more serious network problem.

RetryInterval setting

The RetryInterval parameter specifies the amount of time to wait between retries of a failed path. This setting gives the path a chance to recover from a transient problem before trying again. If you are using a dual controller NAS model and encountering a situation that iSCSI or SMB lost connections during the NAS is in Takeover state, you may check if this value is changed from the default value.

TimeOutValue setting

The disk TimeOutValue parameter specifies how long an I/O request is held at the SCSI layer before timing out and passing a timeout error to the application above.

UseCustomPathRecoveryInterval setting

The UseCustomPathRecoveryInterval setting enables or disables the usage of the PathRecoveryInterval setting.

Note that this parameter affects all DSMs on the system.

Example Workflows

List All MPIO Managed Disks by mpclaim

The command “mpclaim” can list all MPIO disks with load balance policy:
> mpclaim -s -d

Change Load Balance Policy for Specific Disks by mpclaim

The command “mpclaim” also can change load balance policy for a specific MPIO disk:
> mpclaim -l -d 0 3

List All MPIO Managed Disk

Qutil should get all MPIO disks first:
> get-wmiobject -Namespace root\wmi -Class mpio_get_descriptor

List All MPIO Managed QNAP Disk

Qutil should get all MPIO disks from QNAP NAS by filtering SerialNumber property with “6E843B6” prefix:
> (get-wmiobject -Namespace root\wmi -Class mpio_disk_info).driveinfo

List Load Balance Policy for Each MPIO QNAP Disk

Qutil should list all load balance policy for each MPIO QNAP disks:
> (get-wmiobject -Namespace root\wmi -Class dsm_querylbpolicy_v2).loadbalancepolicy

LoadBalancePolicy Definition:

0: Clear the Policy
1: Failover Only
2: Round Robin
3: Round Robin with Subset
4: Least Queue Depth
5: Weighted Paths
6: Least Blocks
7: Vendor Specific

Was this article helpful?

50% of people think it helps.
Thank you for your feedback.

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Choose specification

      Show more Less

      Choose Your Country or Region

      open menu
      back to top