summaryrefslogtreecommitdiffstats
path: root/sbin/geom
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-04-18 09:42:14 +0000
committermav <mav@FreeBSD.org>2012-04-18 09:42:14 +0000
commit91acf8bc72cacf3a83f290d5ade6b0ff0909c9dc (patch)
treef795390c1bf7cf3a8fad5b540e390767cf5fa8d6 /sbin/geom
parent0d3166270cacbd524f40f7818d75c0e727e545d1 (diff)
downloadFreeBSD-src-91acf8bc72cacf3a83f290d5ade6b0ff0909c9dc.zip
FreeBSD-src-91acf8bc72cacf3a83f290d5ade6b0ff0909c9dc.tar.gz
Some improvements to GEOM MULTIPATH:
- Implement "configure" command to allow switching operation mode of running device on-fly without destroying and recreation. - Implement Active/Read mode as hybrid of Active/Active and Active/Passive. In this mode all paths not marked FAIL may handle reads same time, but unlike Active/Active only one path handles write requests at any point in time. It allows to closer follow original write request order if above layers need it for data consistency (not waiting for requisite write completion before sending dependent write). - Hide duplicate messages about device status change. - Remove periodic thread wake up with 10Hz rate. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sbin/geom')
-rw-r--r--sbin/geom/class/multipath/geom_multipath.c17
-rw-r--r--sbin/geom/class/multipath/gmultipath.836
2 files changed, 45 insertions, 8 deletions
diff --git a/sbin/geom/class/multipath/geom_multipath.c b/sbin/geom/class/multipath/geom_multipath.c
index ecbaa37..a821951 100644
--- a/sbin/geom/class/multipath/geom_multipath.c
+++ b/sbin/geom/class/multipath/geom_multipath.c
@@ -55,17 +55,28 @@ struct g_command class_commands[] = {
"create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL,
{
{ 'A', "active_active", NULL, G_TYPE_BOOL },
+ { 'R', "active_read", NULL, G_TYPE_BOOL },
G_OPT_SENTINEL
},
- "[-vA] name prov ..."
+ "[-vAR] name prov ..."
},
{
"label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, mp_main,
{
{ 'A', "active_active", NULL, G_TYPE_BOOL },
+ { 'R', "active_read", NULL, G_TYPE_BOOL },
G_OPT_SENTINEL
},
- "[-vA] name prov ..."
+ "[-vAR] name prov ..."
+ },
+ { "configure", G_FLAG_VERBOSE, NULL,
+ {
+ { 'A', "active_active", NULL, G_TYPE_BOOL },
+ { 'P', "active_passive", NULL, G_TYPE_BOOL },
+ { 'R', "active_read", NULL, G_TYPE_BOOL },
+ G_OPT_SENTINEL
+ },
+ "[-vAPR] name"
},
{
"add", G_FLAG_VERBOSE, NULL, G_NULL_OPTS,
@@ -196,6 +207,8 @@ mp_label(struct gctl_req *req)
}
strlcpy(md.md_uuid, ptr, sizeof (md.md_uuid));
md.md_active_active = gctl_get_int(req, "active_active");
+ if (gctl_get_int(req, "active_read"))
+ md.md_active_active = 2;
free(ptr);
/*
diff --git a/sbin/geom/class/multipath/gmultipath.8 b/sbin/geom/class/multipath/gmultipath.8
index f225f72..55a86f3 100644
--- a/sbin/geom/class/multipath/gmultipath.8
+++ b/sbin/geom/class/multipath/gmultipath.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 31, 2011
+.Dd April 18, 2012
.Dt GMULTIPATH 8
.Os
.Sh NAME
@@ -33,15 +33,19 @@
.Sh SYNOPSIS
.Nm
.Cm create
-.Op Fl Av
+.Op Fl ARv
.Ar name
.Ar prov ...
.Nm
.Cm label
-.Op Fl Av
+.Op Fl ARv
.Ar name
.Ar prov ...
.Nm
+.Cm configure
+.Op Fl APRv
+.Ar name
+.Nm
.Cm add
.Op Fl v
.Ar name prov
@@ -121,7 +125,9 @@ Kernel will only check that all given providers have same media and
sector sizes.
.Pp
.Fl A
-option enables Active/Active mode, otherwise Active/Passive mode is used
+option enables Active/Active mode,
+.Fl R
+option enables Active/Read mode, otherwise Active/Passive mode is used
by default.
.It Cm label
Create multipath device with
@@ -134,8 +140,19 @@ It reliably protects against specifying unrelated providers.
Providers with no matching metadata detected will not be added to the device.
.Pp
.Fl A
-option enables Active/Active mode, otherwise Active/Passive mode is used
+option enables Active/Active mode,
+.Fl R
+option enables Active/Read mode, otherwise Active/Passive mode is used
by default.
+.It Cm configure
+Configure the given multipath device.
+.Pp
+.Fl A
+option enables Active/Active mode,
+.Fl P
+option enables Active/Passive mode,
+.Fl R
+option enables Active/Read mode.
.It Cm add
Add the given provider as a path to the given multipath device.
Should normally be used only for devices created with
@@ -221,7 +238,8 @@ of multiple pathnames refer to the same device should be left to the
system operator who will use tools and knowledge of their own storage
subsystem to make the correct configuration selection.
.Pp
-There are Active/Passive and Active/Active operation modes supported.
+There are Active/Passive, Active/Read and Active/Active operation modes
+supported.
In Active/Passive mode only one path has I/O moving on it
at any point in time.
This I/O continues until an I/O is returned with
@@ -231,6 +249,12 @@ in a list is selected as active and the failed I/O reissued.
In Active/Active mode all paths not marked FAIL may handle I/O same time.
Requests are distributed between paths to equalize load.
For capable devices it allows to utilize bandwidth of all paths.
+In Active/Read mode all paths not marked FAIL may handle reads same time,
+but unlike Active/Active only one path handles write requests at any
+point in time.
+It allows to closer follow original write request order if above layer
+needs it for data consistency (not waiting for requisite write completion
+before sending dependent write).
.Pp
When new devices are added to the system the
.Nm MULTIPATH
OpenPOWER on IntegriCloud