Skip to contentSkip to conversation

multipath-tools: *untested* use sysfs prio also for arrays with dual implicit/explicit alua support

RFC PATCH In review Xose Vazquez Perez 3 participants 4 messages Jul 24, 2020 – Aug 11, 2020 Device mapper

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 multipath-tools: *untested* use sysfs prio also for arrays with dual implicit/explicit alua support

Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc DM-DEVEL ML <[email protected]>

---

libmultipath/propsel.c +1 -1
index 897e48ca..5a82234f 100644
@@ -595,7 +595,7 @@ detect_prio(struct config *conf, struct path * pp)
 		tpgs = path_get_tpgs(pp);
 		if (tpgs == TPGS_NONE)
 			return;
-		if ((tpgs == TPGS_EXPLICIT || !check_rdac(pp)) &&
+		if ((tpgs == TPGS_EXPLICIT || tpgs == TPGS_BOTH || !check_rdac(pp)) &&
 		    sysfs_get_asymmetric_access_state(pp, buff, 512) >= 0)
 			default_prio = PRIO_SYSFS;
 		else

In short:

libmultipath/propsel.c +1 -1
index 897e48ca..a9609a01 100644
@@ -595,7 +595,7 @@ detect_prio(struct config *conf, struct path * pp)
 		tpgs = path_get_tpgs(pp);
 		if (tpgs == TPGS_NONE)
 			return;
-		if ((tpgs == TPGS_EXPLICIT || !check_rdac(pp)) &&
+		if ((tpgs != TPGS_IMPLICIT || !check_rdac(pp)) &&
 		    sysfs_get_asymmetric_access_state(pp, buff, 512) >= 0)
 			default_prio = PRIO_SYSFS;
 		else
#1 lore raw

Hi Xose,

do you have a specific use case where this helps / changes matters?

The idea of the current code is to use PRIO_SYSFS always, except for RDAC arrays with implicit ALUA, where periodic RTPGs are necessary (see 7e2f46d). This patch would change matters only for RDAC arrays which advertise both explicit and implicit ALUA support.

Maybe Steven can clarify if such RDAC arrays exist, and whether we should use PRIO_SYSFS or PRIO_ALUA for them.

Martin

Quoted 41 lines · Xose Vazquez Perez
Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc DM-DEVEL ML <[email protected]>

---

libmultipath/propsel.c +1 -1
index 897e48ca..5a82234f 100644
@@ -595,7 +595,7 @@ detect_prio(struct config *conf, struct path *
 pp)
  		tpgs = path_get_tpgs(pp);
  		if (tpgs == TPGS_NONE)
  			return;
-		if ((tpgs == TPGS_EXPLICIT || !check_rdac(pp)) &&
+		if ((tpgs == TPGS_EXPLICIT || tpgs == TPGS_BOTH ||

!check_rdac(pp)) &&
sysfs_get_asymmetric_access_state(pp, buff, 512) >=
0)
default_prio = PRIO_SYSFS;
else

In short:

libmultipath/propsel.c +1 -1
index 897e48ca..a9609a01 100644
@@ -595,7 +595,7 @@ detect_prio(struct config *conf, struct path *
 pp)
  		tpgs = path_get_tpgs(pp);
  		if (tpgs == TPGS_NONE)
  			return;
-		if ((tpgs == TPGS_EXPLICIT || !check_rdac(pp)) &&
+		if ((tpgs != TPGS_IMPLICIT || !check_rdac(pp)) &&
  		    sysfs_get_asymmetric_access_state(pp, buff, 512) >=
 0)
  			default_prio = PRIO_SYSFS;
  		else
#2 lore raw

An RDAC array configured to run with Linux DM-MP should never report that it supports implicit and explicit ALUA support. If the array is configured to run with scsi_dh_rdac then it reports TPGS=0 (none) and should use rdac prio. The more modern configuration is to report TPGS=01b (implicit) and use scsi_dh_alua and alua prio.

Thanks,
Steve

Quoted 65 lines

From: Martin Wilck <[email protected]>
Sent: Wednesday, August 5, 2020 4:13 PM
To: Xose Vazquez Perez <[email protected]>; Benjamin Marzinski <[email protected]>; Hannes Reinecke <[email protected]>; DM-DEVEL ML <[email protected]>
Cc: Schremmer, Steven <[email protected]>
Subject: Re: [PATCH RFC] multipath-tools: *untested* use sysfs prio also for arrays with dual implicit/explicit alua support

Hi Xose,

do you have a specific use case where this helps / changes matters?

The idea of the current code is to use PRIO_SYSFS always, except for RDAC arrays with implicit ALUA, where periodic RTPGs are necessary (see 7e2f46d). This patch would change matters only for RDAC arrays which advertise both explicit and implicit ALUA support.

Maybe Steven can clarify if such RDAC arrays exist, and whether we should use PRIO_SYSFS or PRIO_ALUA for them.

Martin

Quoted 41 lines · Xose Vazquez Perez
Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc DM-DEVEL ML <[email protected]>

---

libmultipath/propsel.c +1 -1
index 897e48ca..5a82234f 100644
@@ -595,7 +595,7 @@ detect_prio(struct config *conf, struct path *
 pp)
              tpgs = path_get_tpgs(pp);
              if (tpgs == TPGS_NONE)
                      return;
-             if ((tpgs == TPGS_EXPLICIT || !check_rdac(pp)) &&
+             if ((tpgs == TPGS_EXPLICIT || tpgs == TPGS_BOTH ||

!check_rdac(pp)) &&

                  sysfs_get_asymmetric_access_state(pp, buff, 512) >=
0)
                      default_prio = PRIO_SYSFS;
              else

In short:

libmultipath/propsel.c +1 -1
index 897e48ca..a9609a01 100644
@@ -595,7 +595,7 @@ detect_prio(struct config *conf, struct path *
 pp)
              tpgs = path_get_tpgs(pp);
              if (tpgs == TPGS_NONE)
                      return;
-             if ((tpgs == TPGS_EXPLICIT || !check_rdac(pp)) &&
+             if ((tpgs != TPGS_IMPLICIT || !check_rdac(pp)) &&
                  sysfs_get_asymmetric_access_state(pp, buff, 512) >=
 0)
                      default_prio = PRIO_SYSFS;
              else
#3 lore raw
Quoted 8 lines · Steven

An RDAC array configured to run with Linux DM-MP should never report that it supports implicit and explicit ALUA support. If the array is configured to run with scsi_dh_rdac then it reports TPGS=0 (none) and should use rdac prio. The more modern configuration is to report TPGS=01b (implicit) and use scsi_dh_alua and alua prio.

Thanks,
Steve

Thanks, Steve. AFAICS that means that we don't need the RFC patch.

Regards
Martin