Evening,
Let me see if I can help.
- there is an ESXi host with 2 or more FC HBAs - We will call them node1 and node2
- there are 2 or more FC switches - We will call them switch-a switch-b
- there is a storage array with 2 or more FC ports - We will call them controller-a controller-b
the ESXi hypervisor must have a CPU process that manages a "routing table" analogous to a Cisco router maintaining its routing table;
in the case of FC multipathing, the host has a destination FC address and figures out that there are N possible paths, and lets say all N paths are up. so the "routing table" has a list of target LUNs, and for each LUN it has a list of egress FC ports and maybe what the policy is (Fixed, MRU, or RR).
-Yes but it's a little more complicated because each path also has a state... active, active optimized or standby which is determined by a special SCSI command and the storage array set's this status. Policy is set by vSphere but does not void array settings
when a VM issues a SCSI write command to a virtual disk, ESXi "intercepts" and encapsulates that command into FCP frames, looks at its "routing table", realizes there are multiple paths and that multipathing has been configured. the hypervisor figures out what to do with each outgoing FCP frame based on the multipathing config, lets say Round Robin. it transmits the frames to the array according to the design of the NMP.
-Well here is the fun part. Let's take on RR since you mentioned it. VMware Round robin requires at least two active paths (active/active or AULA array most ALUA arrays don't use RR) VMware write 1000 commands down one path then switches in order. So it's 1000 writes switch etc... So it's really simple VMware knows what path it needs to use of the active / active and write 1000 times then switches. On MRU it just writes down the single path until it's gone. On Fixed it writes down fixed until gone.
the frames eventually reach the storage array, possibly hitting multiple FC ports, so the array network stack needs to assemble into order and then pass the raw SCSI command to the SCSI controller. after the writes, the SCSI controller returns a completion status message. the storage array's network stack then looks at its own "routing table", chooses an egress FC port, and transmits the frame back to the host.
-Correct roughly each array does it a little different (for example using cache)
so in other words, multipathing is handled entirely by the OS of the host and of the array; the VM has no clue, and FC switches in between have no idea what those two rascals are doing.
->100% Correct multipathing is a software construct that guest vm's are completely unaware of in any way. FC Switches also know nothing their job it's to fling packets (just like a L2 switch - which they are)
is this anywhere close to how multipathing works?
->Pretty close.
You knowledge is good. There is a great vmware storage book out there if you want to dive in called
Storage Implementation in vSphere 5.0
Which will provide more detail than you ever need... I am not sure the VCP requires this level of detail but in case it never hurts to know more. Multipathing on other OS's is more fun vmware implements a basic but effective solution to multipathing. All of this applies to Fiber channel only.
Let me know if you have additional questions or I did not answer your question
Thanks,
J