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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "[email protected]"