Date: Thu, 10 May 2012 20:09:39 +0300 From: Alexander Motin <mav@FreeBSD.org> To: Trent Nelson <trent@snakebite.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: <4FABF653.9030609@FreeBSD.org> In-Reply-To: <7CED0E39-8C64-4AC1-80BA-D6DE9703E022@snakebite.org> References: <4FABE1A8.4000609@FreeBSD.org> <7CED0E39-8C64-4AC1-80BA-D6DE9703E022@snakebite.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10.05.2012 19:36, Trent Nelson wrote: > 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 moment. > > 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-0011116ae789 > GEOM_MULTIPATH: da0 now active path in Fred > GEOM_MULTIPATH: adding da2 to Fred/b631385f-c61c-11db-b884-0011116ae789 > > 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. It may be not very convenient, but there is a `gmultipath rotate` command to change active path. I'll look on adding possibility to set specific path. > (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.) Now path switching doesn't waits for running requests completion. Is it a problem for you? -- Alexander Motin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FABF653.9030609>