From owner-cvs-src@FreeBSD.ORG Tue Feb 27 04:01:58 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB25E16A401; Tue, 27 Feb 2007 04:01:58 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id BC2B613C481; Tue, 27 Feb 2007 04:01:58 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l1R41wac085014; Tue, 27 Feb 2007 04:01:58 GMT (envelope-from mjacob@repoman.freebsd.org) Received: (from mjacob@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1R41w5O085013; Tue, 27 Feb 2007 04:01:58 GMT (envelope-from mjacob) Message-Id: <200702270401.l1R41w5O085013@repoman.freebsd.org> From: Matt Jacob Date: Tue, 27 Feb 2007 04:01:58 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/etc/mtree BSD.include.dist src/sbin/geom/class Makefile src/sbin/geom/class/multipath Makefile geom_multipath.c src/sys/conf NOTES files src/sys/geom/multipath g_multipath.c g_multipath.h src/sys/modules/geom Makefile ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2007 04:01:58 -0000 mjacob 2007-02-27 04:01:58 UTC FreeBSD src repository Modified files: etc/mtree BSD.include.dist sbin/geom/class Makefile sys/conf NOTES files sys/modules/geom Makefile Added files: sbin/geom/class/multipath Makefile geom_multipath.c sys/geom/multipath g_multipath.c g_multipath.h sys/modules/geom/geom_multipath Makefile Log: First cut at GEOM based multipath. This is an active/passive{/passive...} arrangement that has no intrinsic internal knowledge of whether devices it is given are truly multipath devices. As such, this is a simplistic approach, but still a useful one. The basic approach is to (at present- this will change soon) use camcontrol to find likely identical devices and and label the trailing sector of the first one. This label contains both a full UUID and a name. The name is what is presented in /dev/multipath, but the UUID is used as a true distinguishor at g_taste time, thus making sure we don't have chaos on a shared SAN where everyone names their data multipath as "Fred". The first of N identical devices (and N *may* be 1!) becomes the active path until a BIO request is failed with EIO or ENXIO. When this occurs, the active disk is ripped away and the next in a list is picked to (retry and) continue with. During g_taste events new disks that meet the match criteria for existing multipath geoms get added to the tail end of the list. Thus, this active/passive setup actually does work for devices which go away and come back, as do (now) mpt(4) and isp(4) SAN based disks. There is still a lot to do to improve this- like about 5 of the 12 recommendations I've received about it, but it's been functional enough for a while that it deserves a broader test base. Reviewed by: pjd Sponsored by: IronPort Systems MFC: 2 months Revision Changes Path 1.111 +2 -0 src/etc/mtree/BSD.include.dist 1.14 +1 -0 src/sbin/geom/class/Makefile 1.1 +10 -0 src/sbin/geom/class/multipath/Makefile (new) 1.1 +230 -0 src/sbin/geom/class/multipath/geom_multipath.c (new) 1.1411 +1 -0 src/sys/conf/NOTES 1.1180 +1 -0 src/sys/conf/files 1.1 +768 -0 src/sys/geom/multipath/g_multipath.c (new) 1.1 +99 -0 src/sys/geom/multipath/g_multipath.h (new) 1.19 +1 -0 src/sys/modules/geom/Makefile 1.1 +8 -0 src/sys/modules/geom/geom_multipath/Makefile (new)