From owner-freebsd-stable@FreeBSD.ORG Wed Mar 15 13:48:39 2006 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 1EF9D16A400 for ; Wed, 15 Mar 2006 13:48:39 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64FEE43D48 for ; Wed, 15 Mar 2006 13:48:38 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (pahevu@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k2FDmVFZ027798; Wed, 15 Mar 2006 14:48:36 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k2FDmVht027797; Wed, 15 Mar 2006 14:48:31 +0100 (CET) (envelope-from olli) Date: Wed, 15 Mar 2006 14:48:31 +0100 (CET) Message-Id: <200603151348.k2FDmVht027797@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, Vadim Goncharov In-Reply-To: <1591151085.20060315181926@mail.ru> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 15 Mar 2006 14:48:37 +0100 (CET) Cc: Subject: Re: swap at beginning of slice - danger? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, Vadim Goncharov List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 13:48:39 -0000 Vadim Goncharov wrote: > I have 5.5-PRERELEASE server in production, booting from ad0s1: > > # BLOCKSIZE=512 swapinfo > Device 512-blocks Used Avail Capacity > /dev/ad0s1b 2097152 52872 2044280 3% > /dev/ad1s1b 2097152 51952 2045200 2% > Total 4194304 104824 4089480 2% > # bsdlabel ad0s1 | fgrep b: > b: 2097152 0 swap > > Previously, on a 4.11 system, swapinfo said that swap size was less than > size of b: partition on a slice - it was ok, as boot sectors are > located at beginning of slice. But now, sizes match exactly. What > changed and is it dangerous nowadays to have swap partition at offset 0 ? The code in sys/swap_pager.c does not touch the first two blocks, where blocks are measured in PAGE_SIZE units. The smallest page size supported on FreeBSD architectures is 4 KB (on i386), so that's at least 2 * 4k, which is 16 sectors on the disk. That's enough to skip MBR, disklabel and boot blocks. In other words: You're save. No danger. No need to worry. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. > Can the denizens of this group enlighten me about what the > advantages of Python are, versus Perl ? "python" is more likely to pass unharmed through your spelling checker than "perl". -- An unknown poster and Fredrik Lundh