From owner-freebsd-rc@freebsd.org Thu Sep 24 11:58:50 2015 Return-Path: Delivered-To: freebsd-rc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9F31A07C23; Thu, 24 Sep 2015 11:58:50 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [IPv6:2a02:6b8:0:801::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3242F1F3D; Thu, 24 Sep 2015 11:58:50 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [IPv6:2a02:6b8:0:801:1::12]) by forward12.mail.yandex.net (Yandex) with ESMTP id 917F6C208FD; Thu, 24 Sep 2015 14:58:48 +0300 (MSK) Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id A9FB2E40356; Thu, 24 Sep 2015 14:58:47 +0300 (MSK) Received: by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mJrtoE5828-wkqO84fA; Thu, 24 Sep 2015 14:58:46 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1443095926; bh=ybhZuG/LECMufkiuUeAkQfCjec/RWrb/o/a3fkoNN6o=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=SlL95tkoTBBmI4/EMurqiSNPOm/jr3FBjYrYTj/MH0AHqhVZBSFMvEQ2ta2JtltKK IecE8+cIcZhhNhN1viUvQANaNwfwUQpzAHIKkJWeqx8uKxKycJxIObwAD8NUAY+4Mh TlrgRlUuPUlTlrp84aLa1qikcwEooYGSB5WKP3Iw= Authentication-Results: smtp13.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-ForeignMX: US Message-ID: <5603E507.4030203@yandex.ru> Date: Thu, 24 Sep 2015 14:56:55 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Slawa Olhovchenkov CC: Andriy Gapon , cem@FreeBSD.org, FreeBSD Current , freebsd-rc@FreeBSD.org Subject: Re: dumpdev in loader.conf vs rc.d/dumpon References: <5602B922.20703@FreeBSD.org> <5602CDBC.7080906@FreeBSD.org> <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> In-Reply-To: <20150924114554.GR21849@zxy.spb.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MwmRE7Rj2lg19BDSmWPwV6n3jlkI8Tm2b" X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 11:58:50 -0000 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--