diff options
author | pjd <pjd@FreeBSD.org> | 2006-11-01 22:51:49 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-11-01 22:51:49 +0000 |
commit | b34fb80d8364fbc4f1737da5f2916fe5b39a9325 (patch) | |
tree | 97b3734a2b0b5f3ef52ead534f66a992a2f04c67 /sbin/geom/class/raid3 | |
parent | 3d8e2e0a6f357ed1a3f49941041c5850215bb15d (diff) | |
download | FreeBSD-src-b34fb80d8364fbc4f1737da5f2916fe5b39a9325.zip FreeBSD-src-b34fb80d8364fbc4f1737da5f2916fe5b39a9325.tar.gz |
Now, that we have gjournal in the tree add possibility to configure
gmirror and graid3 in a way that it is not resynchronized after a
power failure or system crash.
It is safe when gjournal is running on top of gmirror/graid3.
Diffstat (limited to 'sbin/geom/class/raid3')
-rw-r--r-- | sbin/geom/class/raid3/geom_raid3.c | 15 | ||||
-rw-r--r-- | sbin/geom/class/raid3/graid3.8 | 12 |
2 files changed, 20 insertions, 7 deletions
diff --git a/sbin/geom/class/raid3/geom_raid3.c b/sbin/geom/class/raid3/geom_raid3.c index 3f4df97..1bb41cb 100644 --- a/sbin/geom/class/raid3/geom_raid3.c +++ b/sbin/geom/class/raid3/geom_raid3.c @@ -58,6 +58,8 @@ struct g_command class_commands[] = { { { 'a', "autosync", NULL, G_TYPE_BOOL }, { 'd', "dynamic", NULL, G_TYPE_BOOL }, + { 'f', "failsync", NULL, G_TYPE_BOOL }, + { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, { 'r', "round_robin", NULL, G_TYPE_BOOL }, @@ -66,7 +68,7 @@ struct g_command class_commands[] = { { 'W', "noverify", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-adhnrRvwW] name" + "[-adfFhnrRvwW] name" }, { "dump", 0, raid3_main, G_NULL_OPTS, "prov ..." @@ -82,12 +84,13 @@ struct g_command class_commands[] = { { "label", G_FLAG_VERBOSE, raid3_main, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, + { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, { 'r', "round_robin", NULL, G_TYPE_BOOL }, { 'w', "verify", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-hnrvw] name prov prov prov ..." + "[-hFnrvw] name prov prov prov ..." }, { "rebuild", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov" @@ -142,7 +145,8 @@ raid3_label(struct gctl_req *req) const char *str; unsigned sectorsize, ssize; off_t mediasize, msize; - int error, i, nargs, hardcode, noautosync, round_robin, verify; + int hardcode, round_robin, verify; + int error, i, nargs; nargs = gctl_get_int(req, "nargs"); if (nargs < 4) { @@ -165,9 +169,10 @@ raid3_label(struct gctl_req *req) md.md_genid = 0; md.md_syncid = 1; md.md_sync_offset = 0; - noautosync = gctl_get_int(req, "noautosync"); - if (noautosync) + if (gctl_get_int(req, "noautosync")) md.md_mflags |= G_RAID3_DEVICE_FLAG_NOAUTOSYNC; + if (gctl_get_int(req, "nofailsync")) + md.md_mflags |= G_RAID3_DEVICE_FLAG_NOFAILSYNC; round_robin = gctl_get_int(req, "round_robin"); if (round_robin) md.md_mflags |= G_RAID3_DEVICE_FLAG_ROUND_ROBIN; diff --git a/sbin/geom/class/raid3/graid3.8 b/sbin/geom/class/raid3/graid3.8 index b2da0bf..d9420b6 100644 --- a/sbin/geom/class/raid3/graid3.8 +++ b/sbin/geom/class/raid3/graid3.8 @@ -33,7 +33,7 @@ .Sh SYNOPSIS .Nm .Cm label -.Op Fl hnrvw +.Op Fl Fhnrvw .Ar name .Ar prov prov prov ... .Nm @@ -42,7 +42,7 @@ .Ar prov ... .Nm .Cm configure -.Op Fl adhnrRvwW +.Op Fl adfFhnrRvwW .Ar name .Nm .Cm rebuild @@ -97,6 +97,9 @@ The number of components must be equal to 3, 5, 9, 17, etc.\& (2^n + 1). .Pp Additional options include: .Bl -tag -width ".Fl h" +.It Fl F +Do not synchronize after a power failure or system crash. +Assumes device is in consistent state. .It Fl h Hardcode providers' names in metadata. .It Fl n @@ -134,6 +137,11 @@ Additional options include: Turn on autosynchronization of stale components. .It Fl d Do not hardcode providers' names in metadata. +.It Fl f +Synchronize device after a power failure or system crash. +.It Fl F +Do not synchronize after a power failure or system crash. +Assumes device is in consistent state. .It Fl h Hardcode providers' names in metadata. .It Fl n |