Heres a question I received recently, that relates to virtual SCSI hdisk path priority.
Hi, Chris,
I use MPIO for our virtualization environment.
I'd like to check which path is currently used.
How can I get the result?
For example:
[nim:/]# lspath
Enabled hdisk0 vscsi0
Enabled hdisk0 vscsi1
Enabled hdisk2 vscsi2
Enabled hdisk1 vscsi1
Enabled hdisk1 vscsi0
Enabled hdisk3 vscsi2
Enabled hdisk2 vscsi3
Enabled hdisk3 vscsi3
How can I determine vscsi0 or vscsi1 is currently carrying data through VIOS and VIOC.
Thanks a lot!
By default the Virtual I/O Client (VIOC) will use the first VIOS for all VSCSI traffic. You can confirm which VSCSI adapter is being used by starting nmon (on the VIOC) and pressing the a key. This will show which vscsi adapter is currently in use. e.g.
topas_nmona=disk-AdaptersHost=lpar42p682e_pubRefresh=2 secs18:38.04
Disk-Adapter-I/O
Name %busy read write xfers Disks Adapter-Type
vscsi3 0.0 0.0 0.0 KB/s 0.0 1 Virtual SCSI Client A
vscsi2 100.0 0.0 218560.0 KB/s 1707.5 1 Virtual SCSI Client A
TOTALS 2 adapters 0.0 218560.0 KB/s 1707.5 2 TOTAL(MB/s)=213.4
Use the lspath command to determine the current path priority for a hdisk. By default it will be set to 1 for both adapters, meaning that traffic will go via the first path. Priority 1 is the highest priority, and you can define a priority from 1 to 255.
# lspath -AE -l hdisk2 -p vscsi2
priority 1 Priority True
# lspath -AE -l hdisk2 -p vscsi3
priority 1 Priority True
You can change the path priority of a hdisk using the chpath command. For example, we change the priority for vscsi2 to 255, so that vscsi3 now has the highest priority:
# chpath -l hdisk2 -a priority=255 -p vscsi2
# chpath -l hdisk2 -a priority=1 -p vscsi3
This will change the path priority for hdisk2 so that its traffic will use vscsi3 instead vscsi2.
topas_nmonb=Black&WhiteHost=lpar42p682e_pubRefresh=2 secs18:40.56
Disk-Adapter-I/O
Name %busy read write xfers Disks Adapter-Type
vscsi3 100.0 0.0 224384.5 KB/s 1753.0 1 Virtual SCSI Client A
vscsi2 0.0 0.0 0.0 KB/s 0.0 1 Virtual SCSI Client A
TOTALS 2 adapters 0.0 224384.5 KB/s 1753.0 2 TOTAL(MB/s)=219.1
Now all the VSCSI traffic (for hdisk2) is traversing the vscsi3 adapter instead of vscsi2.