diff options
author | pjd <pjd@FreeBSD.org> | 2004-07-05 21:16:37 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-07-05 21:16:37 +0000 |
commit | 782281411585b11c71b5fc34d535c71848a7efd9 (patch) | |
tree | f9d11c474284afcadba02b886c45bd73c725b0b6 /sbin/geom/class/stripe | |
parent | fe7583f88c43e3d41c4526d3f8370a0b22407f37 (diff) | |
download | FreeBSD-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/class/stripe')
-rw-r--r-- | sbin/geom/class/stripe/geom_stripe.c | 9 | ||||
-rw-r--r-- | sbin/geom/class/stripe/gstripe.8 | 18 |
2 files changed, 24 insertions, 3 deletions
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 |