2 Replies Latest reply: Oct 21, 2014 2:36 AM by crw RSS

    Nimble Path Selection Policy with NCM -- Script?

    crw Wayfarer

      We have hosts that were recently setup. I installed the latest version of NCM via VMWare Update Manager prior to configuring/scanning for iscsi volumes. I am noticing now that the path policy is set to Round Robin and not Nimble_PSP_Directed. I am not sure if the old nimble psp (for IO change and Round Robin) script was run against these machines or what. I do notice when I create a new volume it sets to nimble_psp_directed as it should.


      That said is there a script that will change the psp to nimble_psp_directed? I only have one for the old round robin psp.



        • Re: Nimble Path Selection Policy with NCM -- Script?

          This is a sample script that will change Nimble device path policy from other to NIMBLE_PSP_DIRECTED. It'll first check to make sure the policy is available. Then for each Nimble device. If it's not in the NIMBLE_PSP_DIRECTED path policy, it'll set it to. This script can be run on ESX host.


          esxcli storage nmp psp list |grep NIMBLE_PSP_DIRECTED >/dev/null


          if [[ $installed -eq 0 ]]; then

            DEVICE_LIST_OUT=$(esxcli storage nmp device list)

            DEVICE_EUI=$(echo "$DEVICE_LIST_OUT" | sed '/^\ /d' | awk '{print tolower($0)}')

            for i in $(echo "$DEVICE_EUI")


              oui=$(echo $i | cut -c21-26)

              if [[ "$oui" == "6c9ce9" ]]; then

                PATH_POLICY=$(echo "$DEVICE_LIST_OUT" |grep -A 6 $i |awk '/Path Selection Policy:/{print $4}')

                if [[ $PATH_POLICY != "NIMBLE_PSP_DIRECTED" ]]; then

                  echo "$(date) Nimble device $i path policy is $PATH_POLICY, setting it to NIMBLE_PSP_DIRECTED."

                  esxcli storage nmp device set --device $i --psp NIMBLE_PSP_DIRECTED


                  echo "$(date) Nimble device $i path policy is NIMBLE_PSP_DIRECTED. No change required."





            echo "NIMBLE_PSP_DIRECTED is not an available policy on this host."