From 3dd75dbc2be856336b3058a8dcee9b1e9ceb1a5a Mon Sep 17 00:00:00 2001 From: Isabell Long Date: Thu, 26 Jul 2012 17:30:34 +0000 Subject: The ad(4) driver no longer exists in FreeBSD CURRENT or 9, so change the references to it in gsched(8) to the existing ada(4) driver. PR: docs/170085 Submitted by: olgeni Approved by: gavin MFC after: 5 days --- sbin/geom/class/sched/gsched.8 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sbin/geom') diff --git a/sbin/geom/class/sched/gsched.8 b/sbin/geom/class/sched/gsched.8 index bb3c1cfe5cb5..ca3ec439a80d 100644 --- a/sbin/geom/class/sched/gsched.8 +++ b/sbin/geom/class/sched/gsched.8 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 29, 2010 +.Dd July 26, 2012 .Dt GSCHED 8 .Os .Sh NAME @@ -135,19 +135,19 @@ maximum amount of debug information is printed. Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES The following example shows how to create a scheduling provider for disk -.Pa /dev/ad0 , +.Pa /dev/ada0 , and how to destroy it. .Bd -literal -offset indent # Load the geom_sched module: kldload geom_sched # Load some scheduler classes used by geom_sched: kldload gsched_rr -# Configure device ad0 to use scheduler "rr": -geom sched insert -a rr ad0 -# Now provider ad0 uses the "rr" algorithm; -# the new geom is ad0.sched. +# Configure device ada0 to use scheduler "rr": +geom sched insert -a rr ada0 +# Now provider ada0 uses the "rr" algorithm; +# the new geom is ada0.sched. # Remove the scheduler on the device: -geom sched destroy -v ad0.sched. +geom sched destroy -v ada0.sched. .Ed .Sh SEE ALSO .Xr geom 4 , -- cgit v1.2.3 From 72a1e3395cce9b11809cdec104fa26c8eda8ff7b Mon Sep 17 00:00:00 2001 From: Joel Dahl Date: Mon, 30 Jul 2012 10:14:37 +0000 Subject: Remove trailing whitespace. --- sbin/geom/class/sched/gsched.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin/geom') diff --git a/sbin/geom/class/sched/gsched.8 b/sbin/geom/class/sched/gsched.8 index ca3ec439a80d..ae04865a21b1 100644 --- a/sbin/geom/class/sched/gsched.8 +++ b/sbin/geom/class/sched/gsched.8 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 26, 2012 +.Dd July 26, 2012 .Dt GSCHED 8 .Os .Sh NAME -- cgit v1.2.3 From 71ee4ef0d92c83132de99f89cd4e77f2ee5fa12a Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Fri, 3 Aug 2012 14:55:35 +0000 Subject: New command "gmultipath prefer" to force selection of a specified provider in an Active/Passive configuration. Reviewed by: mav MFC after: 4 weeks --- sbin/geom/class/multipath/geom_multipath.c | 26 ++++++++++++++++++++++++++ sbin/geom/class/multipath/gmultipath.8 | 9 ++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) (limited to 'sbin/geom') diff --git a/sbin/geom/class/multipath/geom_multipath.c b/sbin/geom/class/multipath/geom_multipath.c index a821951d3bee..cdf35d0381ec 100644 --- a/sbin/geom/class/multipath/geom_multipath.c +++ b/sbin/geom/class/multipath/geom_multipath.c @@ -49,6 +49,7 @@ uint32_t version = G_MULTIPATH_VERSION; static void mp_main(struct gctl_req *, unsigned int); static void mp_label(struct gctl_req *); static void mp_clear(struct gctl_req *); +static void mp_prefer(struct gctl_req *); struct g_command class_commands[] = { { @@ -86,6 +87,10 @@ struct g_command class_commands[] = { "remove", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov" }, + { + "prefer", G_FLAG_VERBOSE, mp_main, G_NULL_OPTS, + "[-v] prov ..." + }, { "fail", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov" @@ -131,6 +136,8 @@ mp_main(struct gctl_req *req, unsigned int flags __unused) mp_label(req); } else if (strcmp(name, "clear") == 0) { mp_clear(req); + } else if (strcmp(name, "prefer") == 0) { + mp_prefer(req); } else { gctl_error(req, "Unknown command: %s.", name); } @@ -294,3 +301,22 @@ mp_clear(struct gctl_req *req) } } +static void +mp_prefer(struct gctl_req *req) +{ + const char *name, *comp, *errstr; + int nargs; + + nargs = gctl_get_int(req, "nargs"); + if (nargs != 2) { + gctl_error(req, "Usage: prefer GEOM PROVIDER"); + return; + } + name = gctl_get_ascii(req, "arg0"); + comp = gctl_get_ascii(req, "arg1"); + errstr = gctl_issue (req); + if (errstr != NULL) { + fprintf(stderr, "Can't set %s preferred provider to %s: %s.\n", + name, comp, errstr); + } +} diff --git a/sbin/geom/class/multipath/gmultipath.8 b/sbin/geom/class/multipath/gmultipath.8 index 55a86f339314..81b85ddbd642 100644 --- a/sbin/geom/class/multipath/gmultipath.8 +++ b/sbin/geom/class/multipath/gmultipath.8 @@ -66,6 +66,11 @@ .Op Fl v .Ar name .Nm +.Cm prefer +.Op Fl v +.Ar name +.Ar prov +.Nm .Cm getactive .Op Fl v .Ar name @@ -171,7 +176,9 @@ If there are other paths present, new requests will be forwarded there. Mark specified provider as a path of the specified multipath device as operational, allowing it to handle requests. .It Cm rotate -Change the active provider/path in Active/Passive mode. +Change the active provider/path to the next available provider in Active/Passive mode. +.It Cm prefer +Change the active provider/path to the specified provider in Active/Passive mode. .It Cm getactive Get the currently active provider(s)/path(s). .It Cm destroy -- cgit v1.2.3 From ad8131190fceff0e83fb2d702ff6e22240a49f3a Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 3 Aug 2012 20:30:40 +0000 Subject: Document "destroy" as an alias for "stop". --- sbin/geom/class/virstor/gvirstor.8 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sbin/geom') diff --git a/sbin/geom/class/virstor/gvirstor.8 b/sbin/geom/class/virstor/gvirstor.8 index cdb50b1d0f53..99eff52fe571 100644 --- a/sbin/geom/class/virstor/gvirstor.8 +++ b/sbin/geom/class/virstor/gvirstor.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2011 +.Dd August 3, 2012 .Dt GVIRSTOR 8 .Os .Sh NAME @@ -43,6 +43,10 @@ .Op Fl fv .Ar name ... .Nm +.Cm destroy +.Op Fl fv +.Ar name ... +.Nm .Cm add .Op Fl vh .Ar name prov ... @@ -107,6 +111,9 @@ Turn off an existing virtual device with the given .Ar name . This command does not touch on-disk metadata. As with other GEOM classes, stopped geoms cannot be started manually. +.It Cm destroy +Same as +.Cm stop. .It Cm add Adds new components to existing virtual device with the given .Ar name . -- cgit v1.2.3 From 5454cb96efbcb3459c960d21a87493961ac3c832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 29 Aug 2012 15:18:56 +0000 Subject: Change the gptboot example so the boot partition is aligned on a 4 kB boundary. MFC after: 3 days --- sbin/geom/class/part/gpart.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin/geom') diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8 index 2e745c40fca3..7a91d3dbc07c 100644 --- a/sbin/geom/class/part/gpart.8 +++ b/sbin/geom/class/part/gpart.8 @@ -1006,11 +1006,12 @@ or but smaller than 545 kB since the first-stage loader will load the entire partition into memory during boot, regardless of how much data it actually contains. -This example uses 94 blocks (47 kB) so the next partition will be +This example uses 88 blocks (44 kB) so the next partition will be aligned on a 64 kB boundary without the need to specify an explicit offset or alignment. +The boot partition itself is aligned on a 4 kB boundary. .Bd -literal -offset indent -/sbin/gpart add -b 34 -s 94 -t freebsd-boot ad0 +/sbin/gpart add -b 40 -s 88 -t freebsd-boot ad0 /sbin/gpart bootcode -p /boot/gptboot -i 1 ad0 .Ed .Pp -- cgit v1.2.3 From c89d2fbe18fbb759c46f041648ff37c0ed398487 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 13 Sep 2012 13:27:09 +0000 Subject: Add global and per-module sysctls/tunables to enable/disable metadata taste. That should help to handle some cases when disk has some RAID metadata that should be ignored, especially during boot. MFC after: 3 days --- sbin/geom/class/raid/graid.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sbin/geom') diff --git a/sbin/geom/class/raid/graid.8 b/sbin/geom/class/raid/graid.8 index e062658c0fd4..630cd018e621 100644 --- a/sbin/geom/class/raid/graid.8 +++ b/sbin/geom/class/raid/graid.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2012 +.Dd September 13, 2012 .Dt GRAID 8 .Os .Sh NAME @@ -293,6 +293,8 @@ Mark volume as clean when idle for the specified number of seconds. Debug level of the .Nm RAID GEOM class. +.It Va kern.geom.raid.enable : No 1 +Enable on-disk metadata taste. .It Va kern.geom.raid.idle_threshold : No 1000000 Time in microseconds to consider a volume idle for rebuild purposes. .It Va kern.geom.raid.name_format : No 0 @@ -302,6 +304,8 @@ Number of read errors equated to disk failure. Write errors are always considered as disk failures. .It Va kern.geom.raid.start_timeout : No 30 Time to wait for missing array components on startup. +.It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1 +Enable taste for specific metadata or transformation module. .El .Sh EXIT STATUS Exit status is 0 on success, and non-zero if the command fails. -- cgit v1.2.3 From bf70becee6ff4798acdcfd586a88ad38b7b17495 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 19 Oct 2012 14:49:42 +0000 Subject: More -Wmissing-variable-declarations fixes. In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'. --- sbin/geom/core/geom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin/geom') diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index 770e960f3c05..8c15c2143e1e 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -74,7 +74,7 @@ static void std_status(struct gctl_req *req, unsigned flags); static void std_load(struct gctl_req *req, unsigned flags); static void std_unload(struct gctl_req *req, unsigned flags); -struct g_command std_commands[] = { +static struct g_command std_commands[] = { { "help", 0, std_help, G_NULL_OPTS, NULL }, { "list", 0, std_list, { -- cgit v1.2.3