Date: Thu, 10 May 2012 09:36:30 -0700 From: Trent Nelson <trent@snakebite.org> To: Alexander Motin <mav@FreeBSD.org> Cc: "mj@feral.com" <mj@feral.com>, "freebsd-geom@FreeBSD.org" <freebsd-geom@FreeBSD.org> Subject: Re: Teaching gmultipath about path cost/priority Message-ID: <7CED0E39-8C64-4AC1-80BA-D6DE9703E022@snakebite.org> In-Reply-To: <4FABE1A8.4000609@FreeBSD.org> References: <4FABE1A8.4000609@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 10, 2012 at 08:41:28AM -0700, Alexander Motin wrote: > Hi. > > > It'd be ideal if there was a way of teaching gmultipath about a path > > cost/priority, so that it can make an informed decision about which > > path to choose a) when first initializing, and b) during failover. > > The problem with this is how to store that in metadata. As soon as all > paths have exactly the same metadata and provider names are not > mentioned there, separate paths properties are not possible at this momen= t. Good point. In my environment, I use all sorts of convoluted ways to figure out which /dev/da[n] disk represents the optimal path I want to use. At the very least, I need to probe things from isp like port id, wwnn and wwpn. It's all very driver/HBA/environment specific. > As dirty workaround, you may periodically run some script to enforce > active path on your specific preference. Ah! Yeah, that was another approach I was thinking of suggesting; an ability to (gracefully) tell gmultipath to start using another path. Ignore my path cost/priority suggestion and pretend I asked that instead ;-) Extending the example in gmultipath(8): # gmultipath label -v FRED /dev/da0 /dev/da2 # disklabel -Brw /dev/multipath/FRED auto # newfs /dev/multipath/FREDa # mount /dev/multipath/FREDa /mnt.... GEOM_MULTIPATH: adding da0 to Fred/b631385f-c61c-11db-b884-0011116ae7= 89 GEOM_MULTIPATH: da0 now active path in Fred GEOM_MULTIPATH: adding da2 to Fred/b631385f-c61c-11db-b884-0011116ae7= 89 Something along the lines of: + # gmultipath active FRED /dev/da2 + GEOM_MULTIPATH: da2 now active path in Fred ....would be perfect! Don't care what it's called; active, failover, switch, select, activate. (I presume gmultipath could affect the path switch in a cleaner fashion than forcing the disk to fail? i.e. make sure all outstanding I/O is finished first, etc.) > Alexander Motin Trent.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7CED0E39-8C64-4AC1-80BA-D6DE9703E022>