From owner-freebsd-rc@FreeBSD.ORG Sat Jun 21 14:57:09 2008 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 812EC106564A for ; Sat, 21 Jun 2008 14:57:09 +0000 (UTC) (envelope-from mtm@wubethiopia.com) Received: from dire.wubethiopia.com (j071.v.rootbsd.net [208.79.82.223]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5178FC13 for ; Sat, 21 Jun 2008 14:57:09 +0000 (UTC) (envelope-from mtm@wubethiopia.com) Received: from rogue.mike.lan (unknown [213.55.65.238]) by dire.wubethiopia.com (Postfix) with ESMTPSA id A3C6A4FD99D2; Sat, 21 Jun 2008 14:56:19 +0000 (UTC) Message-ID: <485D17AD.4020807@wubethiopia.com> Date: Sat, 21 Jun 2008 18:01:01 +0300 From: Mike Makonnen User-Agent: Thunderbird 2.0.0.12 (X11/20080323) MIME-Version: 1.0 To: Volker References: <200806192107.m5JL7G5D048010@freefall.freebsd.org> In-Reply-To: <200806192107.m5JL7G5D048010@freefall.freebsd.org> Content-Type: multipart/mixed; boundary="------------090709060304010705020602" Cc: freebsd-bugs@FreeBSD.org, freebsd-rc@freebsd.org Subject: Re: conf/124747: [patch] savecore can't create dump from encrypted swap X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 21 Jun 2008 14:57:09 -0000 This is a multi-part message in MIME format. --------------090709060304010705020602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit linimon@FreeBSD.org wrote: > Synopsis: [patch] savecore can't create dump from encrypted swap > > Responsible-Changed-From-To: freebsd-bugs->freebsd-rc > Responsible-Changed-By: linimon > Responsible-Changed-When: Thu Jun 19 21:06:28 UTC 2008 > Responsible-Changed-Why: > Over to maintainer(s). > The problem with this patch is that savecore(8) requires a filesystem to dump *to*. So, at the very minimum it needs to require rc.d/mountcritlocal (not to mention that the dump directory might be on an nfs mounted partition, which means it would also need to require rc.d/mountcritremote). I think this patch removes functionality from a majority of our users to fix a problem encountered by a minority. However, it may be possible to go the other way. Instead of moving savecore to the start of the line we could try to move swap to *after* savecore. However, this introduces two problems: 1. fsck(8) might need swap turn on early 2. mdconfig might also need swap turned on before it can create swap backed device. I'm pretty sure there was a previous discussion about #1 being necessary, but I'm not sure about #2. In any case, the patch is attached. Cheers. -- Mike Makonnen | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc mtm @ FreeBSD.Org | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 FreeBSD | http://www.freebsd.org --------------090709060304010705020602 Content-Type: text/plain; name="rc.d-savecore-encswap.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rc.d-savecore-encswap.patch" Index: etc/rc.d/SERVERS =================================================================== RCS file: /home/ncvs/src/etc/rc.d/SERVERS,v retrieving revision 1.8 diff -u -r1.8 SERVERS --- etc/rc.d/SERVERS 8 Dec 2007 07:20:22 -0000 1.8 +++ etc/rc.d/SERVERS 21 Jun 2008 14:37:15 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig +# REQUIRE: mountcritremote abi ldconfig localswap encswap # This is a dummy dependency, for early-start servers relying on # some basic configuration. Index: etc/rc.d/early.sh =================================================================== RCS file: /home/ncvs/src/etc/rc.d/early.sh,v retrieving revision 1.3 diff -u -r1.3 early.sh --- etc/rc.d/early.sh 9 Oct 2007 07:30:14 -0000 1.3 +++ etc/rc.d/early.sh 21 Jun 2008 14:34:23 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: early -# REQUIRE: disks localswap +# REQUIRE: disks # BEFORE: fsck # Index: etc/rc.d/encswap =================================================================== RCS file: /home/ncvs/src/etc/rc.d/encswap,v retrieving revision 1.8 diff -u -r1.8 encswap --- etc/rc.d/encswap 5 Aug 2005 23:38:51 -0000 1.8 +++ etc/rc.d/encswap 21 Jun 2008 14:32:45 -0000 @@ -3,8 +3,8 @@ # $FreeBSD: src/etc/rc.d/encswap,v 1.8 2005/08/05 23:38:51 pjd Exp $ # -# PROVIDE: disks -# REQUIRE: initrandom +# PROVIDE: encswap +# REQUIRE: initrandom savecore # KEYWORD: nojail . /etc/rc.subr Index: etc/rc.d/fsck =================================================================== RCS file: /home/ncvs/src/etc/rc.d/fsck,v retrieving revision 1.12 diff -u -r1.12 fsck --- etc/rc.d/fsck 8 Dec 2007 07:20:22 -0000 1.12 +++ etc/rc.d/fsck 21 Jun 2008 14:35:01 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: fsck -# REQUIRE: localswap +# REQUIRE: disks # KEYWORD: nojail . /etc/rc.subr Index: etc/rc.d/mdconfig =================================================================== RCS file: /home/ncvs/src/etc/rc.d/mdconfig,v retrieving revision 1.5 diff -u -r1.5 mdconfig --- etc/rc.d/mdconfig 25 Aug 2007 00:19:17 -0000 1.5 +++ etc/rc.d/mdconfig 21 Jun 2008 14:35:48 -0000 @@ -28,7 +28,7 @@ # # PROVIDE: mdconfig -# REQUIRE: localswap +# REQUIRE: disks # BEFORE: mountcritlocal . /etc/rc.subr Index: etc/rc.d/savecore =================================================================== RCS file: /home/ncvs/src/etc/rc.d/savecore,v retrieving revision 1.11 diff -u -r1.11 savecore --- etc/rc.d/savecore 8 Dec 2007 07:20:22 -0000 1.11 +++ etc/rc.d/savecore 21 Jun 2008 14:32:07 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: savecore -# REQUIRE: syslogd +# REQUIRE: mountcritremote syslogd # BEFORE: SERVERS # KEYWORD: nojail Index: etc/rc.d/swap1 =================================================================== RCS file: /home/ncvs/src/etc/rc.d/swap1,v retrieving revision 1.10 diff -u -r1.10 swap1 --- etc/rc.d/swap1 8 Dec 2007 07:20:22 -0000 1.10 +++ etc/rc.d/swap1 21 Jun 2008 14:33:20 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: localswap -# REQUIRE: disks +# REQUIRE: disks savecore # KEYWORD: nojail shutdown . /etc/rc.subr --------------090709060304010705020602--