ESXi and iSCSI I/O policy - how to make persistent?

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,738
Hi all,

so this is my TN 12.0 hosted iSCSI target as seen from an ESXi 7.0-U1 host:
Code:
[root@esxi:~] esxcli storage nmp device list
naa.6589cfc0000009ef775032adb15747f5
Device Display Name: TrueNAS iSCSI Disk (naa.6589cfc0000009ef775032adb15747f5)
[...]

Set policy to RR and IOPS to 1:
Code:
[root@esxi:~] esxcli storage nmp device set -P VMW_PSP_RR -d naa.6589cfc0000009ef775032adb15747f5
[root@esxi:~] esxcli storage nmp psp roundrobin deviceconfig set -I 1 -t iops -d naa.6589cfc0000009ef775032adb15747f5

Check if it worked:
Code:
[root@esxi:~] esxcli storage nmp device list
naa.6589cfc0000009ef775032adb15747f5
Device Display Name: TrueNAS iSCSI Disk (naa.6589cfc0000009ef775032adb15747f5)
Storage Array Type: VMW_SATP_ALUA
Storage Array Type Device Config: {implicit_support=on; explicit_support=off; explicit_allow=on; alua_followover=on; action_OnRetryErrors=off; {TPG_id=1,TPG_state=AO}}
Path Selection Policy: VMW_PSP_RR
Path Selection Policy Device Config: {policy=iops,iops=1,bytes=10485760,useANO=0; lastPathIndex=0: NumIOsPending=0,numBytesPending=0}
Path Selection Policy Device Custom Config: policy=iops;iops=1;bytes=10485760;samplingCycles=16;latencyEvalTime=180000;useANO=0;
Working Paths: vmhba64:C1:T0:L0, vmhba64:C0:T0:L0
Is USB: false
[...]


Problem: after every reboot of the ESXi host I am back to VMW_PSP_MRU and only vmhba64:C1:T0:L0 as a working path.
The VMware documentation claims things set with esxcli storage nmp device set are persistent.

Any hints?
Thanks!
Patrick
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,110
VMware documentation being inaccurate, say it ain't so. ;)

You need to set up an SATP claim rule to make this persistent, with a -V(endor) flag for FreeNAS or TrueNAS depending on version.

Edit: Apply these rules for TrueNAS CORE/Enterprise 12/13, or SCALE 23.10 only. These were designed for vSphere 6.7 and may need to be updated for newer vSphere versions that use inherent latency/path failure detection.

esxcli storage nmp satp rule add -s "VMW_SATP_ALUA" -V "FreeNAS" -M "iSCSI Disk" -P "VMW_PSP_RR" -O "iops=1" -e "FreeNAS iSCSI Claim Rule"
esxcli storage nmp satp rule add -s "VMW_SATP_ALUA" -V "TrueNAS" -M "iSCSI Disk" -P "VMW_PSP_RR" -O "iops=1" -e "TrueNAS iSCSI Claim Rule"

For TrueNAS SCALE 22.12 (Bluefin) apply the following:

esxcli storage nmp satp rule add -s "VMW_SATP_DEFAULT_AA" -V "FreeNAS" -M "iSCSI Disk" -P "VMW_PSP_RR" -O "iops=1" -e "FreeNAS iSCSI Claim Rule"
esxcli storage nmp satp rule add -s "VMW_SATP_DEFAULT_AA" -V "TrueNAS" -M "iSCSI Disk" -P "VMW_PSP_RR" -O "iops=1" -e "TrueNAS iSCSI Claim Rule"
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,738
Working, thank you!
 
Top