FreeBSD Bugzilla – Attachment 143027 Details for
Bug 190152
[patch] [rc] gmirror savecore support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
savecore.patch
savecore.patch (text/plain), 3.74 KB, created by
Paul J Murphy
on 2014-05-23 20:10:00 UTC
(
hide
)
Description:
savecore.patch
Filename:
MIME Type:
Creator:
Paul J Murphy
Created:
2014-05-23 20:10:00 UTC
Size:
3.74 KB
patch
obsolete
>Index: etc/defaults/rc.conf >=================================================================== >--- etc/defaults/rc.conf (revision 266549) >+++ etc/defaults/rc.conf (working copy) >@@ -595,6 +595,9 @@ > savecore_flags="-m 10" # Used if dumpdev is enabled above, and present. > # By default, only the 10 most recent kernel dumps > # are saved. >+savecore_gmirror_name="" # gmirror provider name containing dumpdev >+savecore_gmirror_balance="load" # gmirror balance algorithm to set after >+ # savecore has run > crashinfo_enable="YES" # Automatically generate crash dump summary. > crashinfo_program="/usr/sbin/crashinfo" # Script to generate crash dump summary. > quota_enable="NO" # turn on quotas on startup (or NO). >Index: etc/rc.d/savecore >=================================================================== >--- etc/rc.d/savecore (revision 266549) >+++ etc/rc.d/savecore (working copy) >@@ -12,6 +12,7 @@ > name="savecore" > start_cmd="savecore_start" > start_precmd="savecore_prestart" >+start_postcmd="savecore_poststart" > stop_cmd=":" > > savecore_prestart() >@@ -40,6 +41,22 @@ > ;; > esac > >+ case ${savecore_gmirror_name} in >+ [Nn][Oo] | '') >+ savecore_gmirror_name='' >+ ;; >+ [Aa][Uu][Tt][Oo]) >+ # TODO: figure out a reasonable method for auto mode >+ ;; >+ esac >+ >+ # If there is no balance algorithm, use the default for new mirrors >+ case ${savecore_gmirror_balance} in >+ '') >+ savecore_gmirror_balance='load' >+ ;; >+ esac >+ > if [ ! -c "${dumpdev}" ]; then > warn "Dump device does not exist. Savecore not run." > return 1 >@@ -49,6 +66,11 @@ > warn "Dump directory does not exist. Savecore not run." > return 1 > fi >+ >+ if [ "${savecore_gmirror_name}" ]; then >+ gmirror configure -b prefer ${savecore_gmirror_name} >+ fi >+ > return 0 > } > >@@ -76,5 +98,12 @@ > fi > } > >+savecore_poststart() >+{ >+ if [ "${savecore_gmirror_name}" ]; then >+ gmirror configure -b ${savecore_gmirror_balance} ${savecore_gmirror_name} >+ fi >+} >+ > load_rc_config $name > run_rc_command "$1" >Index: sbin/geom/class/mirror/gmirror.8 >=================================================================== >--- sbin/geom/class/mirror/gmirror.8 (revision 266549) >+++ sbin/geom/class/mirror/gmirror.8 (working copy) >@@ -298,10 +298,23 @@ > gmirror activate data da1 > .Ed > .Sh NOTES >-Doing kernel dumps to >+.Ss Booting from a gmirror provider >+Systems which boot from a > .Nm >-providers. >+provider will need to make the geom_mirror kernel module available at >+boot time. If it is not included in the base kernel, but is available >+as a loadable module (the normal situation with the standard GENERIC >+kernel build), the following should be added to the >+.Pa /boot/loader.conf >+file: >+.Bd -literal -offset indent >+geom_mirror_load="YES" >+.Ed > .Pp >+Obviously, normal partitioning and boot code will be required in >+addition to loading the kernel module. >+.Ss Doing kernel dumps to gmirror providers. >+.Pp > This is possible, but some conditions have to be met. > First of all, a kernel dump will go only to one component and > .Nm >@@ -313,18 +326,12 @@ > will read only from the component with the highest priority). > If you use a different balance algorithm, you should add: > .Bd -literal -offset indent >-gmirror configure -b prefer data >+.No savecore_gmirror_name= Ns Qq Ar name >+.No savecore_gmirror_balance= Ns Qq Ar balance > .Ed > .Pp > to the >-.Pa /etc/rc.early >-script and: >-.Bd -literal -offset indent >-gmirror configure -b round-robin data >-.Ed >-.Pp >-to the >-.Pa /etc/rc.local >+.Pa /etc/rc.conf > script. > The decision which component to choose for dumping is made when > .Xr dumpon 8 >@@ -353,8 +360,6 @@ > .Sh AUTHORS > .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org > .Sh BUGS >-There should be a way to change a component's priority inside a running mirror. >-.Pp > There should be a section with an implementation description. > .Pp > Documentation for sysctls
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 190152
: 143027