summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class/nop
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-07-30 08:19:22 +0000
committerpjd <pjd@FreeBSD.org>2004-07-30 08:19:22 +0000
commit7a7cae7b301959b58ccdd024218b041284190951 (patch)
tree066eb7f5148319fa4f307bc25eef6c3efdd8d8a8 /sbin/geom/class/nop
parent4f6d0f295349dcdd675bb247fbaa2280c293115a (diff)
downloadFreeBSD-src-7a7cae7b301959b58ccdd024218b041284190951.zip
FreeBSD-src-7a7cae7b301959b58ccdd024218b041284190951.tar.gz
- Add '-S' option, which allow to specify sector size for transparent
provider. - Bump version number. This allows for a quite interesting trick. One can setup a stripe with stripe size of 512 bytes and create transparent provider on top of it with sector size equal to <ndisks> * 512. The result will be something like RAID3 without parity disk (every access will touch all disks).
Diffstat (limited to 'sbin/geom/class/nop')
-rw-r--r--sbin/geom/class/nop/geom_nop.c4
-rw-r--r--sbin/geom/class/nop/gnop.83
2 files changed, 6 insertions, 1 deletions
diff --git a/sbin/geom/class/nop/geom_nop.c b/sbin/geom/class/nop/geom_nop.c
index cd4f6af..a5edfde 100644
--- a/sbin/geom/class/nop/geom_nop.c
+++ b/sbin/geom/class/nop/geom_nop.c
@@ -40,6 +40,7 @@ uint32_t version = G_NOP_VERSION;
static intmax_t failprob = 0;
static intmax_t offset = 0;
+static intmax_t secsize = 0;
static intmax_t size = 0;
struct g_command class_commands[] = {
@@ -48,6 +49,7 @@ struct g_command class_commands[] = {
{ 'f', "failprob", &failprob, G_TYPE_NUMBER },
{ 'o', "offset", &offset, G_TYPE_NUMBER },
{ 's', "size", &size, G_TYPE_NUMBER },
+ { 'S', "secsize", &secsize, G_TYPE_NUMBER },
G_OPT_SENTINEL
}
},
@@ -71,7 +73,7 @@ void
usage(const char *name)
{
- fprintf(stderr, "usage: %s create [-v] [-f failprob] [-o offset] [-s size] <dev1> [dev2 [...]]\n", name);
+ fprintf(stderr, "usage: %s create [-v] [-f failprob] [-o offset] [-s size] [-S secsize] <dev1> [dev2 [...]]\n", name);
fprintf(stderr, " %s configure [-v] [-f failprob] <prov1> [prov2 [...]]\n", name);
fprintf(stderr, " %s destroy [-fv] <prov1> [prov2 [...]]\n", name);
}
diff --git a/sbin/geom/class/nop/gnop.8 b/sbin/geom/class/nop/gnop.8
index 54cad18..5ff7e07 100644
--- a/sbin/geom/class/nop/gnop.8
+++ b/sbin/geom/class/nop/gnop.8
@@ -37,6 +37,7 @@
.Op Fl f Ar failprob
.Op Fl o Ar offset
.Op Fl s Ar size
+.Op Fl S Ar secsize
.Ar dev1
.Op Ar dev2 Op Ar ...
.Nm
@@ -109,6 +110,8 @@ Specifies failure probability in percentage.
Where to begin on the original provider.
.It Fl s Ar size
Size of the transparent provider.
+.It Fl S Ar secsize
+Sector size of the transparent provider.
.It Fl v
Be more verbose.
.El
OpenPOWER on IntegriCloud