gmirror(8) has NOTES section on doing kernel dumps to gmirror
providers and wanting to use a different balance algorithm through use
of /etc/rc.early and /etc/rc.local.
But, /etc/rc.early is no more.
Provide an alternative solution to /etc/rc.early, such as create
an equilavalent /etc/rc.d/early? create some other /etc/rc.d/<file>
that is "BEFORE: dumpon"? Some other way?
Plus the original early script wouldn't work, since it would get called
after dumpon. Since it is "REQUIRE: disks" while dumpon is
I think this shouldn't be too hard to automate in the dumpon script,
to be honest.
Please can you try the patch at , and set
in /etc/rc.conf, and let me know if it works OK?
Pawel, does this look sane?
Sorry for not replying sooner, but it didn't quite work for me and
forgot to come back later to see why, since what I hacked seemed to be
So, I revisited this problem.
One change to your diff... http://lkc.me/5D
Name: Lawrence "The Dreamer" Chen Email: email@example.com
Snail: 1530 College Ave, A5 Blog: http://lawrencechen.net
Manhattan, KS 66502-2768 Phone: 785-789-4132
On 2013-11-06 07:56, The BSD Dreamer wrote:
> Sorry for not replying sooner, but it didn't quite work for me and
> forgot to come back later to see why, since what I hacked seemed to be
> working...until recently.
> So, I revisited this problem.
> One change to your diff... http://lkc.me/5D
System: FreeBSD zen.lhaven.homeip.net 9.2-RELEASE-p4 FreeBSD 9.2-RELEASE-p4
#0: Tue Apr 8 18:08:22 UTC 2014
So, recently, I had the system panic twice, where it did dumps but they
couldn't be found by /etc/rc.d/savecore.
Leads me to suspect that this rc script needs a similar tweak.
Discovered the dumpon script wasn't working as expected...turns out its because I have /usr as a separate filesystem and dumpon is called before such things are mounted. So it can't find 'grep' (/usr/bin/grep), other commands reside in /sbin or /bin....
But, in bug 190152 it sounds like the modification to dumpon is unnecessary.
Since my balance preference is for 'load' (the default) and savecore (at least)
needs to get switched to 'prefer'...I just hard coded both dumpon and savecore on my system to switch to prefer and then back to load.
Perhaps, an rc.conf variable to specify what balance preference is used (possibly defaulting to 'load' if not set), to avoid trying to grep the output of 'gmirror list <name>'.
'grep' works in savecore, since its called much later...well after FILESYSTEMS (in fact between NETWORKING and SERVERS...closer to SERVERS.) Guess its fortunate that nothing has touched swap during up to this point, because swapon is done a little after dumpon.
I have addressed this like so:
This rc.d script fires before savecore and changes the balance to "prefer" and ensures that a specified GEOM provider has a specified priority.
This rc.d script fires after savecore and changes the balance back to whatever is specified in rc.conf (or wherever).
I have tested it working.
In the longer term I think it would be nice if the base system could be smart enough to do something similar. Until then this appears to do the trick.
Can we get an updated patch against FreeBSD head (as of today), as an attachment in this issue, that incorporates any additions/changes/fixes from those referenced in comment 1, comment 2, comment 3 and comment 5 please where appropriate/necessary
If man page changes are required, please provide that as a second patch in this issue as well
^Triage: Issues shouldn't be " in progress" without a real assignee, re-open. Re-classify (product/component)
*** Bug 190152 has been marked as a duplicate of this bug. ***
Created attachment 205001 [details]
gmirror(8) manpage patch
Patch for lib/geom/mirror/gmirror.8 that adds dumpon/savecore scripts for gmirror with modern rc ordering
See attachment that adds handling scripts for gmirror dumpon/savecore support.
Tentative initial version.
Can someone commit the patches? It would be great to get it in 12.1.
(In reply to Christos Chatzaras from comment #10)
I would like if somebody could review and give their blessing before any merging, for I am but a scrub. :)