diff options
author | mjacob <mjacob@FreeBSD.org> | 2007-02-27 04:01:58 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2007-02-27 04:01:58 +0000 |
commit | 05b92097cb751ac3e6ba126eed272f954f9c7210 (patch) | |
tree | 3740487c6f9b60010343610543a779a7e9a63d31 /sys/modules | |
parent | 502eb2ec0e1f3a8e4b78b14ccfaad6822c33bbb6 (diff) | |
download | FreeBSD-src-05b92097cb751ac3e6ba126eed272f954f9c7210.zip FreeBSD-src-05b92097cb751ac3e6ba126eed272f954f9c7210.tar.gz |
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
Diffstat (limited to 'sys/modules')
-rw-r--r-- | sys/modules/geom/Makefile | 1 | ||||
-rw-r--r-- | sys/modules/geom/geom_multipath/Makefile | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/modules/geom/Makefile b/sys/modules/geom/Makefile index 011ff4c..26e2209 100644 --- a/sys/modules/geom/Makefile +++ b/sys/modules/geom/Makefile @@ -12,6 +12,7 @@ SUBDIR= geom_bde \ geom_label \ geom_mbr \ geom_mirror \ + geom_multipath \ geom_nop \ geom_pc98 \ geom_raid3 \ diff --git a/sys/modules/geom/geom_multipath/Makefile b/sys/modules/geom/geom_multipath/Makefile new file mode 100644 index 0000000..d036fe0 --- /dev/null +++ b/sys/modules/geom/geom_multipath/Makefile @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../geom/multipath + +KMOD= geom_multipath +SRCS= g_multipath.c + +.include <bsd.kmod.mk> |