View | Details | Raw Unified | Return to bug 190152
Collapse All | Expand All

(-)etc/defaults/rc.conf (+3 lines)
Lines 595-600 Link Here
595
savecore_flags="-m 10"	# Used if dumpdev is enabled above, and present.
595
savecore_flags="-m 10"	# Used if dumpdev is enabled above, and present.
596
			# By default, only the 10 most recent kernel dumps
596
			# By default, only the 10 most recent kernel dumps
597
			# are saved.
597
			# are saved.
598
savecore_gmirror_name="" # gmirror provider name containing dumpdev
599
savecore_gmirror_balance="load" # gmirror balance algorithm to set after
600
			# savecore has run
598
crashinfo_enable="YES"	# Automatically generate crash dump summary.
601
crashinfo_enable="YES"	# Automatically generate crash dump summary.
599
crashinfo_program="/usr/sbin/crashinfo"	# Script to generate crash dump summary.
602
crashinfo_program="/usr/sbin/crashinfo"	# Script to generate crash dump summary.
600
quota_enable="NO"	# turn on quotas on startup (or NO).
603
quota_enable="NO"	# turn on quotas on startup (or NO).
(-)etc/rc.d/savecore (+29 lines)
Lines 12-17 Link Here
12
name="savecore"
12
name="savecore"
13
start_cmd="savecore_start"
13
start_cmd="savecore_start"
14
start_precmd="savecore_prestart"
14
start_precmd="savecore_prestart"
15
start_postcmd="savecore_poststart"
15
stop_cmd=":"
16
stop_cmd=":"
16
17
17
savecore_prestart()
18
savecore_prestart()
Lines 40-45 Link Here
40
		;;
41
		;;
41
	esac
42
	esac
42
43
44
	case ${savecore_gmirror_name} in
45
	[Nn][Oo] | '')
46
		savecore_gmirror_name=''
47
		;;
48
	[Aa][Uu][Tt][Oo])
49
		# TODO: figure out a reasonable method for auto mode
50
		;;
51
	esac
52
53
	# If there is no balance algorithm, use the default for new mirrors
54
	case ${savecore_gmirror_balance} in
55
	'')
56
		savecore_gmirror_balance='load'
57
		;;
58
	esac
59
43
	if [ ! -c "${dumpdev}" ]; then
60
	if [ ! -c "${dumpdev}" ]; then
44
		warn "Dump device does not exist.  Savecore not run."
61
		warn "Dump device does not exist.  Savecore not run."
45
		return 1
62
		return 1
Lines 49-54 Link Here
49
		warn "Dump directory does not exist.  Savecore not run."
66
		warn "Dump directory does not exist.  Savecore not run."
50
		return 1
67
		return 1
51
	fi
68
	fi
69
70
	if [ "${savecore_gmirror_name}" ]; then
71
		gmirror configure -b prefer ${savecore_gmirror_name}
72
	fi
73
52
	return 0
74
	return 0
53
}
75
}
54
76
Lines 76-80 Link Here
76
	fi
98
	fi
77
}
99
}
78
100
101
savecore_poststart()
102
{
103
	if [ "${savecore_gmirror_name}" ]; then
104
		gmirror configure -b ${savecore_gmirror_balance} ${savecore_gmirror_name}
105
	fi
106
}
107
79
load_rc_config $name
108
load_rc_config $name
80
run_rc_command "$1"
109
run_rc_command "$1"
(-)sbin/geom/class/mirror/gmirror.8 (-13 / +18 lines)
Lines 298-307 Link Here
298
gmirror activate data da1
298
gmirror activate data da1
299
.Ed
299
.Ed
300
.Sh NOTES
300
.Sh NOTES
301
Doing kernel dumps to
301
.Ss Booting from a gmirror provider
302
Systems which boot from a
302
.Nm
303
.Nm
303
providers.
304
provider will need to make the geom_mirror kernel module available at
305
boot time.  If it is not included in the base kernel, but is available
306
as a loadable module (the normal situation with the standard GENERIC
307
kernel build), the following should be added to the
308
.Pa /boot/loader.conf
309
file:
310
.Bd -literal -offset indent
311
geom_mirror_load="YES"
312
.Ed
304
.Pp
313
.Pp
314
Obviously, normal partitioning and boot code will be required in
315
addition to loading the kernel module.
316
.Ss Doing kernel dumps to gmirror providers.
317
.Pp
305
This is possible, but some conditions have to be met.
318
This is possible, but some conditions have to be met.
306
First of all, a kernel dump will go only to one component and
319
First of all, a kernel dump will go only to one component and
307
.Nm
320
.Nm
Lines 313-330 Link Here
313
will read only from the component with the highest priority).
326
will read only from the component with the highest priority).
314
If you use a different balance algorithm, you should add:
327
If you use a different balance algorithm, you should add:
315
.Bd -literal -offset indent
328
.Bd -literal -offset indent
316
gmirror configure -b prefer data
329
.No savecore_gmirror_name= Ns Qq Ar name
330
.No savecore_gmirror_balance= Ns Qq Ar balance
317
.Ed
331
.Ed
318
.Pp
332
.Pp
319
to the
333
to the
320
.Pa /etc/rc.early
334
.Pa /etc/rc.conf
321
script and:
322
.Bd -literal -offset indent
323
gmirror configure -b round-robin data
324
.Ed
325
.Pp
326
to the
327
.Pa /etc/rc.local
328
script.
335
script.
329
The decision which component to choose for dumping is made when
336
The decision which component to choose for dumping is made when
330
.Xr dumpon 8
337
.Xr dumpon 8
Lines 353-360 Link Here
353
.Sh AUTHORS
360
.Sh AUTHORS
354
.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
361
.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
355
.Sh BUGS
362
.Sh BUGS
356
There should be a way to change a component's priority inside a running mirror.
357
.Pp
358
There should be a section with an implementation description.
363
There should be a section with an implementation description.
359
.Pp
364
.Pp
360
Documentation for sysctls
365
Documentation for sysctls

Return to bug 190152