From owner-freebsd-current@FreeBSD.ORG Mon Sep 1 23:58:56 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CA4416A4C0 for ; Mon, 1 Sep 2003 23:58:56 -0700 (PDT) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 8C40343FBD for ; Mon, 1 Sep 2003 23:58:54 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: (qmail 71687 invoked by uid 1002); 2 Sep 2003 06:58:53 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 2 Sep 2003 06:58:53 -0000 Message-ID: <3F543FA0.7020801@freebsd.org> Date: Tue, 02 Sep 2003 00:58:40 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Doug Barton References: <41076.1062480964@critter.freebsd.dk> <20030901233731.U6074@znfgre.qbhto.arg> In-Reply-To: <20030901233731.U6074@znfgre.qbhto.arg> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Poul-Henning Kamp cc: freebsd-current@freebsd.org Subject: Re: swapon vs savecore dilemma X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 06:58:56 -0000 Doug Barton wrote: > On Tue, 2 Sep 2003, Poul-Henning Kamp wrote: > > >>Hmm, that was an unfortunate side effect. > > > Heh, well, stuff happens. I think your idea of opening swap exclusive is > probably a good one, but it will require some gymnastics to accomodate > it. One thing that'd really help is an option to savecore that tells us > if there is a dump to deal with or not. If I had that, we could do > something like this in /etc/rc.d/savecore > > if there is no dump > exit > else > does fsck -p of the fs to write the dump to succeed? > mount it rw > write the dump > clear the dump > exit > else > does try fsck -y of the fs without swap succeed? > mount, write, clear, exit > else > ??? > > At the ??? point I'm not sure how best to proceed, since if we swapon to > the same partition with the dump, it's likely to corrupt the dump, yes? > On the other hand, we're doing swapon before savecore now, so I guess > I'm curious about how dangerous this really is. > > Probably the right thing to do is to swapon, fsck -y, and if it succeeds > then swapoff, and try writing the dump anyway. I just want to be > sure before we start re-writing rc.d/savecore. > > So, the first question is does the pseudocode above look reasonable, and > the second question is what's the likelihood of getting an option to > savecore to detect a dump to play with? > > Doug > I still think that the real problem is in running swapon before savecore. In 99% of the cases out there, RAM scales with storage, so I really can't imaging fsck needing to swap, and certainly not in it's 'preen-before-background' mode. Scott