Re: dumpdev in loader.conf vs rc.d/dumpon

From: Slawa Olhovchenkov <slw_at_zxy.spb.ru>
Date: Thu, 24 Sep 2015 15:54:05 +0300
On Thu, Sep 24, 2015 at 02:56:55PM +0300, Andrey V. Elsukov wrote:

> On 24.09.2015 14:45, Slawa Olhovchenkov wrote:
> > On Thu, Sep 24, 2015 at 02:37:39PM +0300, Andrey V. Elsukov wrote:
> > 
> >> On 24.09.2015 14:37, Slawa Olhovchenkov wrote:
> >>> For example, host with 3TB of RAM, booted from small SSD.
> >>> This SSD have 16GB slice for dumping. This is sufficent if trouble
> >>> happen at boot time. This is insuuficient if trouble happen later,
> >>> after using all 3TB. rc.d script can be used for select iSCSI
> >>> destination, for dumping after succesefull boot.
> >>
> >> Did you read dumpon script and saw how it uses dumpdev tunable?
> > 
> > This is script try it in case dumpdev=auto, before trying swap
> > partition.
> 
> Yes.
> 
> 1. If you did set dumpdev from loader prompt or from /boot/loader.conf,
> and you didn't configured it in rc.conf, then this choice will be
> applied by geom_dev. Then it will be applied again by rc.d/dumpon.
> 
> 2. If you did set dumpdev from loader prompt or from /boot/loader.conf,
> and you did configured it in rc.conf, then first of will be selected
> dumpdev from loader, then will be selected one from rc.conf.
> 
> 3. If you didn't set dumpdev from loader prompt or from
> /boot/loader.conf, and you didn't configured it in rc.conf, then one of
> swap partition will be selected.
> 
> In the end we can see, if we apply the following patch, then nothing
> will be affected.

1. If no swap configured in fstab, but configured dumpdev from loader
prompt symlink in devfs for savecore not created.
2. If swap configured in fstab and dumpdev configured from loader prompt
(and different from swap) -- dumpdev changed (unexpectedly?).

> Index: dumpon
> ===================================================================
> --- dumpon	(revision 288047)
> +++ dumpon	(working copy)
> _at__at_ -34,11 +34,6 _at__at_ dumpon_start()
>  	[Nn][Oo] | '')
>  		;;
>  	[Aa][Uu][Tt][Oo])
> -		dev=$(/bin/kenv -q dumpdev)
> -		if [ -n "${dev}" ] ; then
> -			dumpon_try "${dev}"
> -			return $?
> -		fi
>  		while read dev mp type more ; do
>  			[ "${type}" = "swap" ] || continue
>  			[ -c "${dev}" ] || continue
> 
> 
> PS. loader(8) has many variables where device name is used, and none of
> them uses /dev/ prefix.

PS. This is another stranges: devfs may be mounted not only to /dev,
but in many places /dev/ prefix is hardcoded and no notes in docs.
Received on Thu Sep 24 2015 - 10:54:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:59 UTC