From owner-freebsd-stable@FreeBSD.ORG Fri Nov 18 23:31:08 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5588316A41F; Fri, 18 Nov 2005 23:31:08 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from ss.eunet.cz (ss.eunet.cz [193.85.228.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54D7143D45; Fri, 18 Nov 2005 23:31:07 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from localhost.i.cz (ss.eunet.cz [193.85.228.13]) by ss.eunet.cz (8.13.1/8.13.1) with ESMTP id jAINVFPJ039146 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 19 Nov 2005 00:31:16 +0100 (CET) (envelope-from mime@traveller.cz) From: Michal Mertl To: Parv In-Reply-To: <20051118231351.GA46946@holestein.holy.cow> References: <991F35AA-151B-4AEA-82BD-5F4AEDF28424@stromnet.org> <74994962-5050-47BD-897B-DE3880B9EBD5@stromnet.org> <1132353600.903.19.camel@genius1.i.cz> <20051118231351.GA46946@holestein.holy.cow> Content-Type: text/plain; charset=ISO-8859-2 Date: Sat, 19 Nov 2005 00:30:49 +0100 Message-Id: <1132356649.903.32.camel@genius1.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: delphij@delphij.net, Johan =?ISO-8859-1?Q?Str=F6m?= , pjd@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Page fault, GEOM problem?? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2005 23:31:08 -0000 Parv wrote: > in message <1132353600.903.19.camel@genius1.i.cz>, wrote Michal > Mertl thusly... > > > > Johan Ström wrote: > > > > > > On 18 nov 2005, at 18.43, Xin LI wrote: > ... > > > So, it seems it does run savecore after running dumpon and > > > mounting disks etc... Is that wrong? > > > > No, this is normal. When you run savecore you need to have mounted > > filesystems. In order to mount the filesystems they may have to be > > checked. The fsck program requires big amount of memory to check > > larger filesystems so the swap has to be enabled. Core dumps are > > written to the dump device (swap) from the end whereas the swap is > > normally used from the beginning (or the other way around). > > Therefore there's quite a big chance that, even when the swap has > > to be used for fsck, the core dump is intact and usable. > > Is there any formula to calculate the size of swap to account for > fsck & core dump while assigning swap size (short of having two swap > partitions)? None that I know of. Someone posted to some FreeBSD mailing list some figures about the fsck consumption of memory. I really don't remember, but I think it was something like some MBs of memory per quite a lot of GB of file system space. E.g. that the fsck on "normally" sized file systems (e.g. at most a couple of hundred GB) doesn't normally cosume all of "normally" sized memory (>=256MB) and thus doesn't need to swap. > > If the usage of the swap file by fsck corrupts the core dump you > > may start after next crash in single user mode and run the > > commands manually (without enabling swap). > > Is that after kernel (re)boots? And would the commands to be > executed be savecore followed by swapon? If the dump got corrupted by fsck, you would have to wait for another crash and dump. Then you would reboot and start in single user mode, repair the file systems without swap enabled (fsck would crash on the large file system(s)) and then run savecore. Swapon is then irrelevant, you probably don't need swap for savecore. After running savecore you can start normally multi user (exit from the single user shell). I didn't try all of that but I believe it should work. Michal