Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2015 14:56:55 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        Andriy Gapon <avg@FreeBSD.org>, cem@FreeBSD.org,  FreeBSD Current <freebsd-current@FreeBSD.org>, freebsd-rc@FreeBSD.org
Subject:   Re: dumpdev in loader.conf vs rc.d/dumpon
Message-ID:  <5603E507.4030203@yandex.ru>
In-Reply-To: <20150924114554.GR21849@zxy.spb.ru>
References:  <5602B922.20703@FreeBSD.org> <CAG6CVpVvStV1pUi8WEBS0T5PaHxFk_HxGi8ch-LXU_DiheyTGw@mail.gmail.com> <5602CDBC.7080906@FreeBSD.org> <CAG6CVpXfBj_-cLj-8EMuAzgk6Ktmh_46e6zBBkZHMBxYW7=Cqg@mail.gmail.com> <5602DA17.7060501@FreeBSD.org> <5603B415.2090405@yandex.ru> <20150924111850.GA3158@zxy.spb.ru> <5603DE11.7010008@yandex.ru> <20150924113714.GQ21849@zxy.spb.ru> <5603E083.9020505@yandex.ru> <20150924114554.GR21849@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--MwmRE7Rj2lg19BDSmWPwV6n3jlkI8Tm2b
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 24.09.2015 14:45, Slawa Olhovchenkov wrote:
> On Thu, Sep 24, 2015 at 02:37:39PM +0300, Andrey V. Elsukov wrote:
>=20
>> 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?
>=20
> This is script try it in case dumpdev=3Dauto, 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.

Index: dumpon
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- dumpon	(revision 288047)
+++ dumpon	(working copy)
@@ -34,11 +34,6 @@ dumpon_start()
 	[Nn][Oo] | '')
 		;;
 	[Aa][Uu][Tt][Oo])
-		dev=3D$(/bin/kenv -q dumpdev)
-		if [ -n "${dev}" ] ; then
-			dumpon_try "${dev}"
-			return $?
-		fi
 		while read dev mp type more ; do
 			[ "${type}" =3D "swap" ] || continue
 			[ -c "${dev}" ] || continue


PS. loader(8) has many variables where device name is used, and none of
them uses /dev/ prefix.

--=20
WBR, Andrey V. Elsukov


--MwmRE7Rj2lg19BDSmWPwV6n3jlkI8Tm2b
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJWA+UHAAoJEAHF6gQQyKF6xr4H/irzf8pFqsN9cSbCSb3X6l5u
LVaiX+8+nSsW8fcLbFijLfBj5Xddld9KKKOLg10to4HW6G9V9weikxdo/ZHLJCCV
iuZOC5itAQs+MwDB1knfaxx3GKWuMVVuU6O5mUoHdBTX25qeKeSF+qGj+2Af3bWp
CBKq77MD62l6K4AIpuR8HFjrzbWly1Hoh18ZZ6kglBK3qoq7jyxt28wJGYPe7i0P
hQf3XU/7fk7SZULX+itEQrFuLH9kaBbBR3sIkgM8X2xOe8TgJMuAqw/IYZZ7Qqdv
rUzzG6imhBkjkZZ/8k9j+EkEyYT3k13DKiOrOyuLERGI/OjyscOM14k6Yt+3Sxc=
=5D4S
-----END PGP SIGNATURE-----

--MwmRE7Rj2lg19BDSmWPwV6n3jlkI8Tm2b--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5603E507.4030203>