Just trying to add some extra info, tested in my lab--
Compliments of awesome work by Tom Bish!
{we} have a Cent9 VM in my lab -
[root@localhost etc]# more redhat-release
CentOS Stream release 9
Which is currently part of a Realtime Ransomware Detection video series --
As part of the test, had both VMDK and RDMA mounted to it:
[twbish@localhost ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 1.8G 0 1.8G 0% /dev/shm
tmpfs 732M 20M 713M 3% /run
efivarfs 256K 26K 226K 11% /sys/firmware/efi/efivars
/dev/mapper/cs-root 70G 6.3G 64G 9% /
/dev/sda2 960M 407M 554M 43% /boot
/dev/mapper/cs-home 2.0T 502G 1.5T 26% /home
/dev/sda1 599M 7.5M 592M 2% /boot/efi
/dev/sdb 590G 488G 73G 88% /home/twbish/Data2
/dev/sdc 1007G 488G 469G 51% /home/twbish/Data3
tmpfs 366M 108K 366M 1% /run/user/1000
And per Chris's nice document, RHEL technote :
Net net --
"There are several different methods used to determine path priority, but the standard one using scsi commands relies on scsi inquiry
device identification page 0x83 and the output from scsi report target port groups (RTPG)
commands.
So inquiry page 83 defines which port group the current device/path is located in, and the report target port groups defines that status of that port group. If either of those pieces of information are not available, then the "prio alua" path priority method cannot be specified within multipath for the associated storage device(s).
Aka, see below for the INQ of 0x83 -
The RTPG output defines port groups, their current state and what path states they support. Each port group within RTPG lists a target port group id along with a number of relative target port ids contained within the port group. This creates, in essense, a set of paired numbers of {port id, relative id} for each port group. The information from scsi inquiry
defines a {port id, relative id} for the lun. Using that as a search key into the RTPG data, the kernel can determine what the path state and in turn the path priority is of the lun. "
ergo ,
Lets put the above into my VM, with both VMDK, and RDM mounted RDMA [over FC ]
Ensure SU --
[root@localhost etc]# sg_rtpg -v /dev/sda
Report target port groups cdb: [a3 0a 00 00 00 00 00 00 04 00 00 00]
Report target port groups:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
Sense Key Specific: Error in Command: byte 0
Report Target Port Groups command not supported
And
[root@localhost twbish]# sg_inq -p 0x0 /dev/sda
VPD INQUIRY: Supported VPD pages page
Supported VPD pages:
0x0 Supported VPD pages
0xb0 Block limits (sbc2)
0xb1 Block device characteristics (sbc3)
0xb2 Logical block provisioning (sbc3)
[root@localhost twbish]# sg_inq -p 0x83 /dev/sda
In both SDA {vmdk} examples above, no luck.
ON THE OTHER HAND, However, a bit more luck on the RDM/RDMA. :
[root@localhost etc]# sg_inq -p 0x0 /dev/sdc
VPD INQUIRY: Supported VPD pages page
Supported VPD pages:
0x0 Supported VPD pages
0x80 Unit serial number
0x83 Device identification
0xb0 Block limits (sbc2)
0xb1 Block device characteristics (sbc3)
0xb2 Logical block provisioning (sbc3)
0xc0 vendor: Firmware numbers (seagate); Unit path report (EMC)
0xc2 vendor: Jumper settings (seagate); Software version (RDAC)
And
[root@localhost etc]# sg_rtpg -v /dev/sdc
Report target port groups cdb: [a3 0a 00 00 00 00 00 00 04 00 00 00]
Report list length = 84
Report target port groups:
target port group id : 0x18 , Pref=0, Rtpg_fmt=0
target port group asymmetric access state : 0x00
T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
status code : 0x00
vendor unique status : 0x00
target port count : 08
Relative target port ids:
0x600
0x601
0x602
0x603
0x604
0x605
0x606
0x607
target port group id : 0x19 , Pref=0, Rtpg_fmt=0
target port group asymmetric access state : 0x01
T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
status code : 0x00
vendor unique status : 0x00
target port count : 08
Relative target port ids:
0xe00
0xe01
0xe02
0xe03
0xe04
0xe05
0xe06
0xe07
[root@localhost etc]#
And
[root@localhost etc]# sg_inq -p 0x83 /dev/sdc
VPD INQUIRY: Device Identification page
Designation descriptor number 1, descriptor length: 20
designator_type: NAA, code_set: Binary
associated with the Addressed logical unit
NAA 6, IEEE Company_id: 0x5076
Vendor Specific Identifier: 0x812840405
Vendor Specific Identifier Extension: 0x7800000000000001
[0x60050768128404057800000000000001]
Designation descriptor number 2, descriptor length: 8
transport: Fibre Channel Protocol for SCSI (FCP-5)
designator_type: Relative target port, code_set: Binary
associated with the Target port
Relative target port: 0xe00
Designation descriptor number 3, descriptor length: 8
transport: Fibre Channel Protocol for SCSI (FCP-5)
designator_type: Target port group, code_set: Binary
associated with the Target port
Target port group: 0x19
Also, as part of the fun that Barry Whyte and Chris Bulmer have previously been so kind to post/blog, confirming the ALUA state:
[root@localhost etc]# sg_rtpg -d /dev/sdc
Report target port groups:
target port group id : 0x18 , Pref=0, Rtpg_fmt=0
target port group asymmetric access state : 0x00 (active/optimized)
T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
status code : 0x00 (no status available)
vendor unique status : 0x00
target port count : 08
Relative target port ids:
0x600
0x601
0x602
0x603
0x604
0x605
0x606
0x607
target port group id : 0x19 , Pref=0, Rtpg_fmt=0
target port group asymmetric access state : 0x01 (active/non optimized)
T_SUP : 0, O_SUP : 0, LBD_SUP : 0, U_SUP : 0, S_SUP : 0, AN_SUP : 0, AO_SUP : 0
status code : 0x00 (no status available)
vendor unique status : 0x00
target port count : 08
Relative target port ids:
0xe00
0xe01
0xe02
0xe03
0xe04
0xe05
0xe06
0xe07
As you can see on the above, "active/ optimized" as well as {active, but non optimized}
[root@localhost etc]# sg_rtpg -d /dev/sdc | grep "access state"
target port group asymmetric access state : 0x00 (active/optimized)
target port group asymmetric access state : 0x01 (active/non optimized)
YET--- going back to sda – [vmdk!]
[root@localhost etc]# sg_rtpg -d /dev/sda | grep "access state"
Report Target Port Groups command not supported
sg_rtpg failed: Illegal request, Invalid opcode
[Which we expect as VMware has its own layers, not directly seen by the guest VM os ]
Hope this helps!
-Andrew