Skip to contentSkip to conversation

Path-priority checker for SGI TPC

PATCH Hannes Reinecke 1 participant 1 message Dec 7, 2005 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi Christophe,

SGI TPC also has the notion of a preferred path; the switch-over to a secondary path takes some seconds. So we should calculate a proper priority for it.

Patch is against current git tree.

Sidenote: The default policy says still 'FAILOVER'. Shouldn't we switch to GROUP_BY_PRIO now that we have a priority checker?

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke			[email protected]
SuSE Linux Products GmbH		S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de

From: Hannes Reinecke <[email protected]>
Subject: path_priority for SGI TP9X00

This patch add the path_priority checker for SGI TPC storage servers. They have a preferred path and one (or several) secondary ones. When accessed from the secondary path the famous 'Auto Volume Transfer' takes over, which switches this path to become the preferred one.

This whole process takes about 10secs, so we should be better select the priority accordingly.

libmultipath/hwtable.c +2 -2
@@ -46,9 +46,9 @@ setup_default_hwtable (vector hw)
 		   DEFAULT_GETUID, "/sbin/mpath_prio_alua %d", "0", "0",
 		   "tur", FAILBACK_UNDEF);
 	r += store_hwe_ext(hw, "SGI", "TP9400", MULTIBUS, DEFAULT_GETUID,
-		   NULL, "0", "0", "tur", FAILBACK_UNDEF);
+		   "/sbin/mpath_prio_tpc /dev/%n", "0", "0", "tur", FAILBACK_UNDEF);
 	r += store_hwe_ext(hw, "SGI", "TP9500", FAILOVER, DEFAULT_GETUID,
-		   NULL, "0", "0", "tur", FAILBACK_UNDEF);
+		   "/sbin/mpath_prio_tpc /dev/%n", "0", "0", "tur", FAILBACK_UNDEF);
 
 	return r;
 }
path_priority/pp_tpc/Makefile new file +29 -0
new file mode 100644
@@ -0,0 +1,29 @@
+EXEC		= mpath_prio_tpc
+BUILD		= glibc
+OBJS		= pp_tpc.o
+
+TOPDIR		= ../..
+include $(TOPDIR)/Makefile.inc
+
+CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes
+
+all: $(BUILD)
+
+glibc:	$(OBJS)
+	$(CC) -o $(EXEC) $(OBJS) $(LDFLAGS)
+	$(STRIP) $(EXEC)
+
+klibc:	$(OBJS)
+	$(CC) -static -o $(EXEC) $(OBJS)
+	$(STRIP) $(EXEC)
+
+install: $(EXEC)
+	install -m 755 $(EXEC) $(DESTDIR)$(bindir)/$(EXEC)
+
+uninstall:
+	rm $(DESTDIR)$(bindir)/$(EXEC)
+clean:	
+	rm -f *.o $(EXEC)
+
+%.o:	%.c
+	$(CC) $(CFLAGS) -c -o $@ $<
path_priority/pp_tpc/pp_tpc.c new file +118 -0

118 lines not on this page · raw message