summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2017-05-23 17:00:56 +0000
committermav <mav@FreeBSD.org>2017-05-23 17:00:56 +0000
commitff54ce5cf6e6c9a42052ce51d668f6c400bd8293 (patch)
tree93af97c71f525f56ee3fc6c4ccf1dd4005e2ecf3 /sbin/geom/class
parent1ab397cd5b6f60a58684c5a3a49dfc4bfc2325e4 (diff)
downloadFreeBSD-src-ff54ce5cf6e6c9a42052ce51d668f6c400bd8293.zip
FreeBSD-src-ff54ce5cf6e6c9a42052ce51d668f6c400bd8293.tar.gz
MFC r309321:
Add `gmirror create` subcommand, alike to gstripe, gconcat, etc. It is quite specific mode of operation without storing on-disk metadata. It can be useful in some cases in combination with some external control tools handling mirror creation and disks hot-plug. Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sbin/geom/class')
-rw-r--r--sbin/geom/class/mirror/geom_mirror.c10
-rw-r--r--sbin/geom/class/mirror/gmirror.815
2 files changed, 24 insertions, 1 deletions
diff --git a/sbin/geom/class/mirror/geom_mirror.c b/sbin/geom/class/mirror/geom_mirror.c
index 30f5f84..f30b96c 100644
--- a/sbin/geom/class/mirror/geom_mirror.c
+++ b/sbin/geom/class/mirror/geom_mirror.c
@@ -79,6 +79,16 @@ struct g_command class_commands[] = {
"[-adfFhnv] [-b balance] [-s slice] name\n"
"[-v] -p priority name prov"
},
+ { "create", G_FLAG_VERBOSE, NULL,
+ {
+ { 'b', "balance", GMIRROR_BALANCE, G_TYPE_STRING },
+ { 'F', "nofailsync", NULL, G_TYPE_BOOL },
+ { 'n', "noautosync", NULL, G_TYPE_BOOL },
+ { 's', "slice", GMIRROR_SLICE, G_TYPE_NUMBER },
+ G_OPT_SENTINEL
+ },
+ "[-Fnv] [-b balance] [-s slice] name prov ..."
+ },
{ "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS,
"[-v] name prov ..."
},
diff --git a/sbin/geom/class/mirror/gmirror.8 b/sbin/geom/class/mirror/gmirror.8
index fb501ca..d8400f1 100644
--- a/sbin/geom/class/mirror/gmirror.8
+++ b/sbin/geom/class/mirror/gmirror.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 27, 2013
+.Dd November 27, 2016
.Dt GMIRROR 8
.Os
.Sh NAME
@@ -43,6 +43,13 @@
.Op Fl v
.Ar prov ...
.Nm
+.Cm create
+.Op Fl Fnv
+.Op Fl b Ar balance
+.Op Fl s Ar slice
+.Ar name
+.Ar prov ...
+.Nm
.Cm configure
.Op Fl adfFhnv
.Op Fl b Ar balance
@@ -170,6 +177,12 @@ Defaults to 4096 bytes.
.El
.It Cm clear
Clear metadata on the given providers.
+.It Cm create
+Similar to
+.Cm label,
+but creates mirror without storing on-disk metadata in last sector.
+This special "manual" operation mode assumes some external control to manage
+mirror detection after reboot, device hot-plug and other external events.
.It Cm configure
Configure the given device.
.Pp
OpenPOWER on IntegriCloud