From owner-freebsd-doc@FreeBSD.ORG Thu Feb 9 00:10:17 2012 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0A091065790 for ; Thu, 9 Feb 2012 00:10:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EBF868FC17 for ; Thu, 9 Feb 2012 00:10:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q190A759093672 for ; Thu, 9 Feb 2012 00:10:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q190A7BZ093671; Thu, 9 Feb 2012 00:10:07 GMT (envelope-from gnats) Resent-Date: Thu, 9 Feb 2012 00:10:07 GMT Resent-Message-Id: <201202090010.q190A7BZ093671@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Niclas Zeising Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A91106564A for ; Thu, 9 Feb 2012 00:02:12 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 2EE2F8FC0C for ; Thu, 9 Feb 2012 00:02:12 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 75EA440007 for ; Thu, 9 Feb 2012 01:02:11 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 6BD4D40010; Thu, 9 Feb 2012 01:02:11 +0100 (CET) Received: from mx.daemonic.se (mx.daemonic.se [IPv6:2001:470:dca9:0:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id BCCC640007 for ; Thu, 9 Feb 2012 01:02:10 +0100 (CET) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 8074E119C1B for ; Thu, 9 Feb 2012 01:02:10 +0100 (CET) Received: from mx.daemonic.se ([IPv6:2001:470:dca9:0:1::3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [2001:470:dca9:0:1::6]) (amavisd-new, port 10025) with ESMTPS id 1Bv4I4vcAjev for ; Thu, 9 Feb 2012 01:02:08 +0100 (CET) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id EEDA8119C17 for ; Thu, 9 Feb 2012 01:02:07 +0100 (CET) Received: from vincent.daemonic.se (login.daemonic.se [IPv6:2001:470:dca9:0:1::10]) by mail.daemonic.se (Postfix) with ESMTPS id DB95B12B20D for ; Thu, 9 Feb 2012 01:02:07 +0100 (CET) Received: (from zeising@localhost) by vincent.daemonic.se (8.14.5/8.14.5/Submit) id q19027Qj059241; Thu, 9 Feb 2012 01:02:07 +0100 (CET) (envelope-from zeising) Message-Id: <201202090002.q19027Qj059241@vincent.daemonic.se> Date: Thu, 9 Feb 2012 01:02:07 +0100 (CET) From: Niclas Zeising To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: docs/164920: [PATCH] changes to swap section of config chapter X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Niclas Zeising List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2012 00:10:17 -0000 >Number: 164920 >Category: docs >Synopsis: [PATCH] changes to swap section of config chapter >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Feb 09 00:10:07 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Niclas Zeising >Release: FreeBSD 9.0-BETA2 amd64 >Organization: >Environment: System: FreeBSD vincent.daemonic.se 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225368: Sat Sep 3 22:13:26 CEST 2011 root@vincent.daemonic.se:/usr/obj/usr/src/sys/VINCENT amd64 >Description: The section about adding swap space on a new harddrive in the configuation and tuning chapter of the handbook is rather inadequate, and the language used is perhaps not entirely suitable for the handbook. >How-To-Repeat: >Fix: Attached patch rewrites this section of the handbook to add a more throughout and clear explanation on how to add more swap space using an existing or new harddrive. Prodded by: A friend who at first couldn't figure out how to add more swap space to a machine. --- handbook.config.chapter.sgml.diff begins here --- Index: en_US.ISO8859-1/books/handbook/config/chapter.sgml =================================================================== RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml,v retrieving revision 1.250 diff -u -d -r1.250 chapter.sgml --- en_US.ISO8859-1/books/handbook/config/chapter.sgml 31 Jan 2012 14:14:59 -0000 1.250 +++ en_US.ISO8859-1/books/handbook/config/chapter.sgml 8 Feb 2012 23:14:35 -0000 @@ -2390,15 +2390,37 @@ of the Handbook. - Swap on a New Hard Drive + Swap on a New or Existing Hard Drive - The best way to add swap, of course, is to use this as an - excuse to add another hard drive. You can always use another - hard drive, after all. If you can do this, go reread the - discussion of swap space - in - of the Handbook for some suggestions on how to best - arrange your swap. + The best way, and the way that gives most performance, is to add + a new swap partition on an existing or new hard drive. How to set up + partitions and harddrives is explaned in + and contains a discussion on + partition layouts and swap partition size considerations. + When a partition is prepared and selected, &man.swapon.8; is used + to add the partition to the system. If the partition is + /dev/ada1s1p2, this will look like: + + &prompt.root; swapon + /dev/ada1s1p2 + + + It is posible to use any partition not currently mounted, even + if it contains a file system. If the partition contains a file + system and is mounted as swap space, the filesystem will be + destroyed. Therefore, make sure that the partition to be added as + swap partition is really the intended partition, before running + swapon. + + + To make this new swap partition automatically added on boot, + change /etc/fstab to include an entry for the + partition. This entry can look something like: + + /dev/ada1s1p1 none swap sw 0 0 + + For an explanation of entries in /etc/fstab, + refer to &man.fstab.5;. --- handbook.config.chapter.sgml.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: