summaryrefslogtreecommitdiffstats
path: root/sbin/geom
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-07-05 21:16:37 +0000
committerpjd <pjd@FreeBSD.org>2004-07-05 21:16:37 +0000
commit782281411585b11c71b5fc34d535c71848a7efd9 (patch)
treef9d11c474284afcadba02b886c45bd73c725b0b6 /sbin/geom
parentfe7583f88c43e3d41c4526d3f8370a0b22407f37 (diff)
downloadFreeBSD-src-782281411585b11c71b5fc34d535c71848a7efd9.zip
FreeBSD-src-782281411585b11c71b5fc34d535c71848a7efd9.tar.gz
- Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous. - Update manual pages and extend examples. - Bump versions.
Diffstat (limited to 'sbin/geom')
-rw-r--r--sbin/geom/class/concat/gconcat.818
-rw-r--r--sbin/geom/class/concat/geom_concat.c9
-rw-r--r--sbin/geom/class/label/geom_label.c9
-rw-r--r--sbin/geom/class/label/glabel.822
-rw-r--r--sbin/geom/class/stripe/geom_stripe.c9
-rw-r--r--sbin/geom/class/stripe/gstripe.818
6 files changed, 74 insertions, 11 deletions
diff --git a/sbin/geom/class/concat/gconcat.8 b/sbin/geom/class/concat/gconcat.8
index 3fc896c..1812022 100644
--- a/sbin/geom/class/concat/gconcat.8
+++ b/sbin/geom/class/concat/gconcat.8
@@ -39,6 +39,11 @@
.Ar dev2
.Op Ar dev3 Op Ar ...
.Nm
+.Cm destroy
+.Op Fl fv
+.Ar name
+.Op Ar name2 Op Ar ...
+.Nm
.Cm label
.Op Fl v
.Ar name
@@ -46,7 +51,7 @@
.Ar dev2
.Op Ar dev3 Op Ar ...
.Nm
-.Cm destroy
+.Cm stop
.Op Fl fv
.Ar name
.Op Ar name2 Op Ar ...
@@ -104,9 +109,13 @@ method, where metadata are stored in every device's last sector.
The kernel module
.Pa geom_concat.ko
will be loaded if it is not loaded already.
-.It Cm destroy
+.It Cm stop
Turn off existing concatenate device by its
.Ar name .
+This command doesn't touch on-disk metadata!
+.It Cm destroy
+Same as
+.Cm stop .
.It Cm clear
Clear metadata on the given devices.
.It Cm list
@@ -135,6 +144,10 @@ concatenation, create a file system on it, and mount it:
gconcat label -v data /dev/da0 /dev/da1 /dev/da2 /dev/da3
newfs /dev/data.concat
mount /dev/data.concat /mnt
+[...]
+umount /mnt
+gconcat stop data
+gconcat unload
.Ed
.Sh DIAGNOSTICS
Exit status is 0 on success, and 1 if the command fails.
@@ -143,6 +156,7 @@ Exit status is 0 on success, and 1 if the command fails.
.Xr geom 8 ,
.Xr mount 8 ,
.Xr newfs 8 ,
+.Xr umount 8 ,
.Xr vinum 8
.Sh HISTORY
The
diff --git a/sbin/geom/class/concat/geom_concat.c b/sbin/geom/class/concat/geom_concat.c
index 8000dcb..3042b5f 100644
--- a/sbin/geom/class/concat/geom_concat.c
+++ b/sbin/geom/class/concat/geom_concat.c
@@ -49,6 +49,7 @@ static void concat_label(struct gctl_req *req);
static void concat_clear(struct gctl_req *req);
struct g_command class_commands[] = {
+ { "clear", G_FLAG_VERBOSE, concat_main, G_NULL_OPTS },
{ "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, G_NULL_OPTS },
{ "destroy", G_FLAG_VERBOSE, NULL,
{
@@ -57,7 +58,12 @@ struct g_command class_commands[] = {
}
},
{ "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, concat_main, G_NULL_OPTS },
- { "clear", G_FLAG_VERBOSE, concat_main, G_NULL_OPTS },
+ { "stop", G_FLAG_VERBOSE, NULL,
+ {
+ { 'f', "force", NULL, G_TYPE_NONE },
+ G_OPT_SENTINEL
+ }
+ },
G_CMD_SENTINEL
};
@@ -72,6 +78,7 @@ usage(const char *name)
fprintf(stderr, "usage: %s create [-v] <name> <dev1> <dev2> [dev3 [...]]\n", name);
fprintf(stderr, " %s destroy [-fv] <name> [name2 [...]]\n", name);
fprintf(stderr, " %s label [-v] <name> <dev1> <dev2> [dev3 [...]]\n", name);
+ fprintf(stderr, " %s stop [-fv] <name> [name2 [...]]\n", name);
fprintf(stderr, " %s clear [-v] <dev1> [dev2 [...]]\n", name);
}
diff --git a/sbin/geom/class/label/geom_label.c b/sbin/geom/class/label/geom_label.c
index bbd6e7f..edb0d7e 100644
--- a/sbin/geom/class/label/geom_label.c
+++ b/sbin/geom/class/label/geom_label.c
@@ -49,6 +49,7 @@ static void label_label(struct gctl_req *req);
static void label_clear(struct gctl_req *req);
struct g_command class_commands[] = {
+ { "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS },
{ "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, G_NULL_OPTS },
{ "destroy", G_FLAG_VERBOSE, NULL,
{
@@ -57,7 +58,12 @@ struct g_command class_commands[] = {
}
},
{ "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, label_main, G_NULL_OPTS },
- { "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS },
+ { "stop", G_FLAG_VERBOSE, NULL,
+ {
+ { 'f', "force", NULL, G_TYPE_NONE },
+ G_OPT_SENTINEL
+ }
+ },
G_CMD_SENTINEL
};
@@ -72,6 +78,7 @@ usage(const char *name)
fprintf(stderr, "usage: %s create [-v] <name> <dev>\n", name);
fprintf(stderr, " %s destroy [-fv] <name> [name2 [...]]\n", name);
fprintf(stderr, " %s label [-v] <name> <dev>\n", name);
+ fprintf(stderr, " %s stop [-fv] <name> [name2 [...]]\n", name);
fprintf(stderr, " %s clear [-v] <dev1> [dev2 [...]]\n", name);
}
diff --git a/sbin/geom/class/label/glabel.8 b/sbin/geom/class/label/glabel.8
index 4b656e2..46f20e9 100644
--- a/sbin/geom/class/label/glabel.8
+++ b/sbin/geom/class/label/glabel.8
@@ -37,12 +37,17 @@
.Ar name
.Ar dev
.Nm
+.Cm destroy
+.Op Fl fv
+.Ar name
+.Op Ar name Op Ar ...
+.Nm
.Cm label
.Op Fl v
.Ar name
.Ar dev
.Nm
-.Cm destroy
+.Cm stop
.Op Fl fv
.Ar name
.Op Ar name Op Ar ...
@@ -127,9 +132,13 @@ method, where metadata is stored in provider's last sector.
The kernel module
.Pa geom_label.ko
will be loaded if it is not loaded already.
-.It Cm destroy
-Turn off the given labels by its
+.It Cm stop
+Turn off the given label by its
.Ar name .
+This command doesn't touch on-disk metadata!
+.It Cm destroy
+Same as
+.Cm stop .
.It Cm clear
Clear metadata on the given devices.
.It Cm list
@@ -158,6 +167,10 @@ create a file system on it, and mount it:
glabel label -v usr /dev/da2
newfs /dev/label/usr
mount /dev/label/usr /usr
+[...]
+umount /usr
+glabel stop usr
+glabel unload
.Ed
.Pp
The next example shows how to setup a label for a UFS file system:
@@ -172,7 +185,8 @@ Exit status is 0 on success, and 1 if the command fails.
.Xr geom 8 ,
.Xr mount 8 ,
.Xr newfs 8 ,
-.Xr tunefs 8
+.Xr tunefs 8 ,
+.Xr umount 8
.Sh HISTORY
The
.Nm
diff --git a/sbin/geom/class/stripe/geom_stripe.c b/sbin/geom/class/stripe/geom_stripe.c
index 24731b7..0ed77c8 100644
--- a/sbin/geom/class/stripe/geom_stripe.c
+++ b/sbin/geom/class/stripe/geom_stripe.c
@@ -52,6 +52,7 @@ static void stripe_label(struct gctl_req *req);
static void stripe_clear(struct gctl_req *req);
struct g_command class_commands[] = {
+ { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS },
{ "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL,
{
{ 's', "stripesize", &stripesize, G_TYPE_NUMBER },
@@ -70,7 +71,12 @@ struct g_command class_commands[] = {
G_OPT_SENTINEL
}
},
- { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS },
+ { "stop", G_FLAG_VERBOSE, NULL,
+ {
+ { 'f', "force", NULL, G_TYPE_NONE },
+ G_OPT_SENTINEL
+ }
+ },
G_CMD_SENTINEL
};
@@ -84,6 +90,7 @@ usage(const char *name)
fprintf(stderr, "usage: %s create [-v] [-s stripesize] <name> <dev1> <dev2> [dev3 [...]]\n", name);
fprintf(stderr, " %s destroy [-fv] <name> [name2 [...]]\n", name);
fprintf(stderr, " %s label [-v] [-s stripesize] <name> <dev1> <dev2> [dev3 [...]]\n", name);
+ fprintf(stderr, " %s stop [-fv] <name> [name2 [...]]\n", name);
fprintf(stderr, " %s clear [-v] <dev1> [dev2 [...]]\n", name);
}
diff --git a/sbin/geom/class/stripe/gstripe.8 b/sbin/geom/class/stripe/gstripe.8
index a2837ae..1f3e7e1 100644
--- a/sbin/geom/class/stripe/gstripe.8
+++ b/sbin/geom/class/stripe/gstripe.8
@@ -40,6 +40,11 @@
.Ar dev2
.Op Ar dev3 Op Ar ...
.Nm
+.Cm destroy
+.Op Fl fv
+.Ar name
+.Op Ar name2 Op Ar ...
+.Nm
.Cm label
.Op Fl v
.Op Fl s Ar stripesize
@@ -48,7 +53,7 @@
.Ar dev2
.Op Ar dev3 Op Ar ...
.Nm
-.Cm destroy
+.Cm stop
.Op Fl fv
.Ar name
.Op Ar name2 Op Ar ...
@@ -106,9 +111,13 @@ method, where metadata are stored in every device's last sector.
The kernel module
.Pa geom_stripe.ko
will be loaded if it is not loaded already.
-.It Cm destroy
+.It Cm stop
Turn off existing striped device by its
.Ar name .
+This command doesn't touch on-disk metadata!
+.It Cm destroy
+Same as
+.Cm stop .
.It Cm clear
Clear metadata on the given devices.
.It Cm list
@@ -139,6 +148,10 @@ for automatic configuration, create a file system on it, and mount it:
gstripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2 /dev/da3
newfs /dev/data.stripe
mount /dev/data.stripe /mnt
+[...]
+umount /mnt
+gstripe stop data
+gstripe unload
.Ed
.Sh DIAGNOSTICS
Exit status is 0 on success, and 1 if the command fails.
@@ -147,6 +160,7 @@ Exit status is 0 on success, and 1 if the command fails.
.Xr geom 8 ,
.Xr mount 8 ,
.Xr newfs 8 ,
+.Xr umount 8 ,
.Xr vinum 8
.Sh HISTORY
The
OpenPOWER on IntegriCloud