VMware Cloud Community
sg222
Contributor
Contributor
Jump to solution

Set preferred path in Service Console on vSphere?

Hi there,

we have a problem here.

Environment: vSphere Host, 8 HBAs, path policy: vmware fixed path, about 1.000 paths to storage

To reduce the total number of paths we want to reconfigure our datastores and reduce the number of used hbas for our test and reference datastores by using just 2 of 8 hbas. We use all of them at the moment, so we have to set 6 of them on all of our vsphere servers to disabled, just two remain active.

Therefore we set active and disabled paths using a script on service console - this works fine.

But after we reduce the active hbas, vsphere seems to forget to reset the preferred path (just checked in the gui). We set vmhba1 and vmhba7 to be active, 0-8 (excluding nr. 6 as it's the lsi controller) to be disabled but on most luns on of these disabled hbas remains the preferred one.

On service console of esx 3.5 we were used to:

/usr/sbin/esxcfg-mpath --preferred --policy=fixed --lun=$lun --path=$:${lun##*\:}

but these options (preferred, policy) seem to be obsolete since vsphere which has apparently sourced these commands out to the storage api?!

Can someone answer the following questions concerning this issue:

1. Does it have an affect on functionality if preferred path is one of the disabled one?

2. Will the vsphere host keeps this configuration after reboot (disabled hbas to a lun, active paths)?

3. Is there a new command to set the preferred path AND / OR the policy (MRU, FIXED, RR) to a lun?

Thanks in advance,

kind regards,

Alex

Reply
0 Kudos
1 Solution

Accepted Solutions
binoche
VMware Employee
VMware Employee
Jump to solution

Hi,

for active/passive, please use MRU;

as you know, when Fixed in use and the luns mapped to multi hosts, 1st host maybe selects fixed path to controller 0, and 2nd host maybe selects fixed path to controller 1, then the active path will change between dual controllers, path thrashing here;

binoche, VMware VCP, Cisco CCNA

View solution in original post

Reply
0 Kudos
6 Replies
binoche
VMware Employee
VMware Employee
Jump to solution

Hi, Alex

1, path policy: vmware fixed, so your storage is Active/Active, correct? if Active/Passive, MRU is the default and recommended policy;

2, how you disable paths? mark them offline?

3, yeah, vSphere use the below command to set preferred path, this set persistent after reboot

esxcli nmp fixed getpreferred --device naa.***

esxcli nmp fixed setpreferred --device naa.*** --path ...

binoche, VMware VCP, Cisco CCNA

sg222
Contributor
Contributor
Jump to solution

Hi binoche,

we set paths to be disabled by:

esxcfg-mpath -P $(esxcfg-mpath -b | grep vmhba$:C0T[0123]:L$ | awk '{print $1}' -s off

var1 and var2 are numbers in two loops in this script.

Our productional SAN is active / active whereas our test- and developement storage (which is the affected one now) is active / passive. So we should use MRU as policy? Something concerning the active controller on storage target i guess?!

Thank you for your help :).

Reply
0 Kudos
binoche
VMware Employee
VMware Employee
Jump to solution

Hi,

for active/passive, please use MRU;

as you know, when Fixed in use and the luns mapped to multi hosts, 1st host maybe selects fixed path to controller 0, and 2nd host maybe selects fixed path to controller 1, then the active path will change between dual controllers, path thrashing here;

binoche, VMware VCP, Cisco CCNA

Reply
0 Kudos
sg222
Contributor
Contributor
Jump to solution

Wua, forgot that point... the policy was fixed since i manage these esx-hosts and never thought about that point - thank you very much!

Reply
0 Kudos
sg222
Contributor
Contributor
Jump to solution

mhm, already posted an answer but i cant see it anymore, therefore: thanks again, we'll set the policy to MRU now for our test- storage.

We set RR for our productional storage as it's not experimental anymore since vsphere (although we already set it on esx 3.5) Smiley Wink

Reply
0 Kudos
binoche
VMware Employee
VMware Employee
Jump to solution

Hi,

please read such as the best practice docs from your storage vendor, they have the correctest recommendations,

binoche, VMware VCP, Cisco CCNA